King Munmu took the throne in the midst of a long conflict against Baekje and Goguryeo, shortly after General Gyebaek and Baekje had been defeated at Sabi by General Kim Yu-shin in 660. In these struggles, Silla was heavily aided by the Tang.
The first years of his reign were spent trying to defeat Goguryeo, following an abortive attempt in 661. Finally, in 667, he ordered another attack which led to the defeat of Goguryeo in 668. After the small isolated pockets of resistance were eliminated, Munmu was the first ruler ever to see the Korean peninsula completely unified.
King Munmu then faced the challenge of freeing his country from Tang domination. After the fall of Goguryeo, Tang created the Protectorate General to Pacify the East and attempted to place the entire Korean peninsula, including Silla, under its rule. To prevent this, Munmu forged alliances with Goguryeo resistance leaders such as Geom Mojam and Anseung, and launched a frontal attack on the Tang forces occupying former Baekje territories. The struggle lasted through the early 670s.
In 674, Tang and its former ally, Silla, were in constant battle, as King Munmu had taken over much of former Baekje and Goguryeo territory from the Tang and fostered resistance against them. Emperor Gaozong, in anger, arbitrarily declared King Munmu's brother, Kim Inmun, the king. However, King Munmu formally apologized and offered tribute, and Emperor Gaozong ordered a withdrawal and recalled Kim Inmun.
In 675, Li Jinxing (Hanja:李謹行) reached Silla territory with Mohe forces that submitted to Tang. However, the Tang forces were defeated by the Silla army at the Maeso fortress (Tang sources claim that the Tang forces won this and other battles in Silla).
Emperor Gaozong ordered withdrawal of Tang forces from the Korean Peninsula entirely and moved the Protectorate General to Pacify the East to Liaodong, allowing Silla to eventually expel Tang out of the Korean Peninsula and unify the parts of the peninsula south of the Taedong River. This victory, and the maintenance of Silla's independence, is generally regarded as a critical turning point in Korean history.
Munmu ruled over unified Silla for twenty years, until he fell ill in 681. On his deathbed, he left his last will and testament, and abdicated to his son, Prince Sinmun. Before he died he said: "A country should not be without a king at any time. Let the Prince have my crown before he has my coffin. Cremate my remains and scatter the ashes in the sea where the whales live. I will become a dragon and thwart foreign invasion." King Sinmun did as his father asked, and scattered his ashes over Daewangam (the Rock of the Great King), a small rocky islet a hundred metres or so off the Korean coast. Moreover, King Sinmun built the Gomun Temple (the Temple of Appreciated Blessing) and dedicated it to his father, he built a waterway for the sea dragon to come to and from the sea and land, and he built a pavilion, Eegun, overlooking the islet so that future kings could pay their respects to the great King Munmu.
In a dream, King Munmu and the famous general Kim Yu-shin appeared to King Sinmun and said to him: "Blowing on a bamboo flute will calm the heavens and the earth." King Sinmun awoke from the dream, rode out to the sea and received the bamboo flute Monposikjuk. It was said that the blowing of the bamboo flute invoked the spirits of King Munmu and General Kim Yu-shin and would push back enemy troops, cure illnesses, bring rain during drought and halt the rains in floods.
The Stele of Munmu Wang that he was of the ethnic Xiongnu race.Portrayed by Lee Jong-soo in the 2012-2013 KBS1 TV series The King's Dream.