In 651, as a young man of twenty-three, Kim Inmun was dispatched by his father, King Muyeol, to Tang China and entered into the service of Tang Gaozong, where he soon won that emperor's trust and esteem. In 653 King Muyeol entrusted his son Inmun with the diplomatic mission of securing a Tang military alliance against Silla's rival Baekje. Kim Inmun mobilized with the Tang troops that subsequently marched on Baekje, and participated in the campaign that ended in the destruction of Baekje and the capture of its last king Uija. Kim Inmun would go on to serve as a regular mediary between the Tang and Silla courts in the years of Korea's unification wars and for a short period thereafter, living much of his life in the Tang capital.
In 674, in the wake of Silla's unification of the peninsula and the subsequent detioration of the Silla-Tang alliance, Kim Inmun was actually named King of Silla by the Tang emperor and ordered to return to Silla to replace his brother on the throne. It was while en route back to Silla that an embassy from Silla was met proferring apologies to Tang and seeking forgiveness. Kim's title was rescinded and he returned to the Tang capital.
The 12th century Korean history Samguk Sagi contains a brief biography of Kim Inmun. There it states that he died of illness in the Tang capital of Chang'an in the fourth month of 694, a detail confirmed in the Tang histories. The Tang emperor sent a special delegation to conduct Kim's body back to Silla. In Silla he was granted the postumous title of Taedae gakgan (태대각간, 太大角干) and was buried on the western plain of the Silla capital of Gyeongju.
The 13th century Samguk Yusa relates that Kim Inmun died on board ship en route back to Silla, but considering the rather detailed account of Kim's death and subsequent funeral embassy found in the Tang histories and repeated in the Samguk Sagi, this account seems doubtful.