His father Wen Junyou (溫君攸) was one of the literary talents retained by the last Northern Qi emperor to wield power over the entire realm, Gao Wei.
Later, after Northern Zhou destroyed Northern Qi in 577 and was in turn itself overthrown in favor of the Sui dynasty in 581, Wen Junyou served as the military assistant for the governor of Si Province (泗州, roughly modern Suzhou, Anhui), but retired under the excuse of illness when he believed that Sui rule was not proper.
All three became known for their abilities, and the Sui official Xue Daoheng (薛道衡), after once meeting the three, remarked, "All three are capable of becoming imperial advisors or chancellors."
In 618, news arrived at You Prefecture that Emperor Yang had been killed in a coup at Jiangdu (江都, in modern Yangzhou, Jiangsu) led by the general Yuwen Huaji.
As Wen had supported Li Yi's decision to submit, Emperor Gaozu made Wen the secretary general of You Prefecture and created him the Duke of Xihe, and soon summoned him to Chang'an to serve as a Zhongshu Sheren (中書舍人), a mid-level official at the legislative bureau (by this point renamed 中書省, Zhongshu Sheng).
Wen Yanbo opposed, stating: Emperor Gaozu thus accepted Goguryeo's tributes, effectively treating King Yeongnyu as a subject.
In 625, Eastern Tujue's Jiali Khan Ashina Duobi attacked Ling Prefecture (靈州, roughly modern Yinchuan, Ningxia).
As Wen was an important official, Ashina Duobi put him under interrogation and asked him about the strengths and weaknesses of the Tang state.
Wen wanted to carry out a major reduction of the civil service system to reduce waste, and this brought many accusations of unfairness from officials as well as criticism that he was overly obsessed with details.
Wen and the chancellor Wang Gui spoke against the rebuke, stating that it was not appropriate for Emperor Taizong to have had an important official become a music teacher for ladies in waiting in the first place.
In 636, Emperor Taizong made Wen a Pushe (僕射), a head of the important executive bureau (尚書省, Shangshu Sheng), and a post also considered one for a chancellor.
After his death, Emperor Taizong was said to state in lament: It was said that Wen's household was not wealthy, and there was no main hall where his wake could be held.