She spent part of her life as a prisoner of the Xiongnu tribe, until Cao Cao paid a heavy sum to redeem her in 207.
Cai Wenji was born shortly before 178 in Yu Perfecture , Chenliu Commandery , in what is now Qi County, Kaifeng, Henan. Cai Wenji was married at the age of fifteen to a Wei Zhongdao in 192, who died shortly after without any offspring. In 195, the chaos after Dong Zhuo's death brought Xiongnu nomads into the Chinese capital and Cai Wenji was taken as prisoner to the northerlands. During her captivity, she became the wife of the Xiongnu chieftain Liu Bao , and bore him two sons. It was not until twelve years later that Cao Cao, the new , ransomed her in the name of her father. When Cai Wenji returned to her homeland, she left her children behind in the frontier.
She married again, this time to a government official named Dong Si . However, Dong Si committed a crime sentencable to death, and Cai Wenji went to Cao Cao to plea for her husband's acquittal. At the time, Cao Cao was having a banquet to entertain guests, who were stirred by Cai Wenji's distressed appearance and behaviour. Touched by such an emotional plea, Cao Cao pardoned Dong Si.
Cai Wenji's father Cai Yong was an established writer, but his works were lost in the ravages of war. At Cao Cao's request, Cai Wenji was able to recite from memory up to four hundred out of four thousand of her father's lost works.
Later in her life, she wrote two poems describing her turbulent years. Her year of death is unknown.
Cai Wenji, like her father, was an established calligrapher of her time, and her works were often praised along with her father's. Her poems were noted for their sorrowful tone, parallel to her hard life. The famous guqin piece ''Eighteen Songs of a Nomad Flute'' is traditionally attributed to her, although the authorship is a perennial issue for scholarly debate. The other two poems, both named "Poem of Sorrow and Anger" , were known to be by her own hand.
Below is an excerpt of the "Poem of Sorrow and Anger" in five-character form :
The stories of Cai Wenji reverberates primarily with the feeling of sorrow, and inspires later artists to keep portraying her past. Her return was the subject of the painting ''Cai Wenji Returns to Her Homeland'' by Zhang Yu, which is now stored in the Long Corridor in the Old Summer Palace. Modern Chinese writer Guo Moruo wrote a play on her life, and there also exists a Beijing opera rendition. Also, a crater on Venus was named CaiWenji, after her name.
Below is a series of eighteen images of Cai Wenji through the eyes of the contemporary artist Wang Miaoqing :