Cen Wenben was born in 595, during the reign of Emperor Wen of Sui. His grandfather Cen Shanfang served under Emperor Xuan of Western Liang, a vassal of Sui Dynasty's predecessor state Northern Zhou who claimed to be the legitimate emperor of Liang Dynasty. His father Cen Zhixiang served as a magistrate of Handan County late in Sui Dynasty. In 608, Cen Zhixiang was falsely accused of crimes. Cen Wenben, who was already talented in writing and was calm and dexterious in his actions, went to the ministry of justice to proclaim his father's innocence and, when questioned, was able to answer and explain clearly. The officials were surprised by his ability to do so despite his young age, and, to test his writing ability, asked him to write an ode to lotus. Cen was able to write it well quickly. Subsequently, he was able to convince the officials that his father was falsely accused, allowing his father to be exculpated. He became famous from the incident. He was subsequently recommended for imperial examinations by the commandery government of his home commandery, but as by that time, most of Sui territory was engulfed in agrarian rebellions against , Cen Wenben did not report for the examinations.
Service under Xiao Xi and Li Xiaogong
In 617, Xiao Xi, a great-grandson of Liang's Emperor Xuan, whom Cen Wenben's grandfather Cen Shanfang had served, rose in rebellion, claiming to restore Liang Dynasty. Xiao Xi established his capital at Jiangling , and he summoned Cen Wenben to serve as ''Zhongshu Shilang'' , the deputy head of the legislative bureau of government . Cen was in charge of writing the imperial edicts. In 621, when the Tang Dynasty general Li Xiaogong the Prince of Zhao Commandery attacked Liang and put Jiangling under siege, Cen suggested to Xiao Xi that he surrendered, and Xiao Xi did so. After Xiao Xi's surrender, however, Li Xiaogong's subordinates wanted to pillage the city. Cen persuaded Li Xiaogong that it would be wrong to do so, and Li Xiaogong subsequently ordered against pillaging. As Li Xiaogong was then put in charge of the former Liang capital, he invited Cen to serve on his staff. In 623, when Emperor Gaozu sent Li Xiaogong to attack the rebel ruler Fu Gongshi the Emperor of Song, Cen followed Li Xiaogong and was in charge of his military correspondences. After Li Xiaogong defeated and killed Fu and was put in charge of Fu's capital Danyang , Cen continued to serve on Li Xiaogong's staff.
During Emperor Taizong's reign
Cen Wenben's activities for the several following years were not recorded in history. By 627, when Emperor Gaozu's son was emperor, he was a lowly-ranked secretary at the archival bureau but also served as a junior official at the legislative bureau. On one occasion when Emperor Taizong carried out a field-tilling ceremony , Cen wrote an ode to field-tilling, and on one new year's day when Emperor Taizong summoned the imperial officials to a feast, Cen wrote an ode to new years's day. The odes were considered beautifully written, and Cen became famous from them. The major general Li Jing also recommended him. He was promoted to a mid-level post in the legislative bureau and became more well-regarded by Emperor Taizong. After Yan Shigu, the official who was largely responsible for drafting imperial edicts during the reign of Emperor Gaozu, was dismissed around that time, the chancellor Wen Yanbo, the head of the legislative bureau, stated to Emperor Taizong that no one was capable as drafting imperial edicts as Yan and sought to have Yan reinstated. Emperor Taizong instead responded, "I have someone else in mind; you, Duke, need not worry." He then made Cen the deputy head of the legislative bureau and made Cen in charge of drafting imperial edicts. At that time, Cen was also assisting Linghu Defen in compiling the official history of Northern Zhou, the ''Book of Zhou''. It was said that most of the commentaries on the biographies were written by Cen. After the work was completed in 636, Emperor Taizong created Cen the Viscount of Jiangling. In 637, when Emperor Taizong visited the eastern capital Luoyang, there were heavy floods of rivers near Luoyang, and Cen took this opportunity to submit a secret petition urging Emperor Taizong to reduce his travel out of the capital. He also pointed out that too many construction projects were being carried out on behalf of Emperor Taizong's favorite son Li Tai the Prince of Wei -- that such expenditures will breed further expenditures. Emperor Taizong was pleased with Cen's petitions and awarded him with silk. In 642, Cen was given the additional designation of ''Zhuanzhang Jimi'' -- considered a chancellor ''de facto'' designation. It was said that Cen was humble and, despite his honorable status, he always greeted those who had known, no matter how minor that person's position was.
in 643, when Emperor Taizong's crown prince Li Chengqian was deposed after he was discovered to have plotted to overthrow Emperor Taizong, Cen and suggested that Emperor Taizong create Li Tai crown prince, but Emperor Taizong subsequently created another son, the Prince of Jin crown prince, believing that Li Tai's machinations was responsible for Li Chengqian's downfall. Emperor Taizong made many high level officials carry additional titles as Li Zhi's staff members, but when he tried to bestow such a title on Cen, Cen declined, stating that he wanted to concentrate on serving the emperor, although Emperor Taizong still had the crown prince meet with Cen every five days and treat him as a friend, not as a subordinate. In 644, when Emperor Taizong, at an imperial gathering, stated to his key officials their strengths and weaknesses, he spoke, with regard to Cen:
:''Cen Wenben is kind-hearted, and writes exquisitely. His logic and analysis are also enduring ones, and he will not fail my expectations.''
Later that year, he was made the head of the legislative bureau, but he rejected all attempts to congratulate him, stating "I will only receive condolences, not congratulations." When his mother asked why, he stated, "I did not have accomplishments and was not an old acquaintance of the emperor. I have, however, received great favors from the emperor, and my position is high and important. That is why I am afraid." When people suggested to him that he spend more time managing his properties, Cen responded:
:''I was only a plain-clothed man from the South, and I walked into the Guanzhong region on my own feet. All I wanted to do was to be an archivist or a county magistrate. I had no contributions on the battlefield, and I got to become ''Zhongshu Ling'' just based on my writing. This is the pinnacle of what I could become. I already receive too much salary. Why should I still try earn more?''
He instead put his younger brother Cen Wenzhao to be in charge of his properties. At that time, Cen Wenzhao was spending time associating with people, and Emperor Taizong was not pleased. He considered demoting Cen Wenzhao out of the capital, but Cen Wenben interceded on his brother's behalf, stating that his mother favored Cen Wenzhao the most, and not having his brother around would cause his mother much distress. Emperor Taizong thus changed his mind, keeping Cen Wenzhao in the capital after summoning him and rebuking him.
In 645, Emperor Taizong was attacking Goguryeo. Cen followed him on the campaign and was deeply involved in the logistics -- so much so that his energy was drained. Emperor Taizong saw that he was speaking in ways that were unusual forhim, and became worried, stating, "Cen Wenben came on this campaign with me, but I am afraid he will not return with me." Cen soon grew ill and died at You Prefecture . He was buried near the tomb of Emperor Taizong's wife Empress Zhangsun, where Emperor Taizong would eventually buried himself. His nephew Cen Changqian and grandson Cen Xi later also served as chancellors.