Historical
Yuan Shao, the most powerful warlord at the time, was defeated by Cao Cao at the Battle of Guandu in 200, and died in 202. After his death, his sons Yuan Tan and Yuan Shang became involved in internectine struggles against each other in trying to control their father's vast domain, and this allowed Cao Cao to play them off against each other, eventually conquering all of the Yuans' territory. While he was still campaigning against the Yuans, he was able to capture Yecheng in 204, and his son Cao Pi, who accompanied him, saw Lady Zhen and became obsessed with her beauty. Even though her husband Yuan Xi was still alive at this point (and would remain so until 207), Cao Pi asked his father permission to marry her. Eight months later, she gave birth to Cao Rui -- leading to incessant gossip that Cao Rui was actually biologically Yuan Xi's son, not Cao Pi's, although that appeared to be rather unlikely given that Yuan Xi had been away from Yecheng for quite some time before Cao Pi married Lady Zhen.
Nevertheless, the rumors became a source of tension between Cao Pi and Lady Zhen. Cao Pi's other favourite, Guo Nüwang, took full advantage of the rumors to increase the tension. Eventually, Lady Zhen lost the favor of Cao Pi. When he forced Emperor Xian of Han to abdicate to him and thus established Cao Wei in 220, he set his capital at Luoyang but did not summon Lady Zhen from Yecheng to join him. Lady Zhen became upset, and Lady Guo reported her anger to Cao Pi, further angering him. In 221, he sent messengers to force her to commit suicide. Her rival Guo Nüwang would become empress the next year.
However, eventually, Cao Pi learned the truth, and regretted what he'd done.
A scene from the book
"Cao Pi drew Lady Zhen toward him and looked at her closely. Her hair hung disordered, her face was dusty and tear-stained, but when, with the sleeve of his inner garment, he had wiped sway these disfigurements, he saw a woman of exquisite loveliness, with a complexion clear as jade touched with the tender bloom of a flower petal, a woman indeed beautiful enough to ruin a kingdom." - Romance of the three Kingdoms.
The Video Games
They meet like they did in the novel, but after Cao Pi saw her, and asked that she left with him, she became angered and started to fight him. Making him fall in love with her some more. She, at first, can't stand his arrogant ways, but when he defeats her, and proves that he is strong, she says "May my body and soul be yours hereafter".
In Dynasty Warriors, their relationship isn't the most romantic ever, but they are constantly on the battlefield together. And they have their own evil twisted ways and share them.
If you finish Dynasty Warriors 5 with Zhen Ji, you unlock an ending where she appears with her husband. They are stood outside of a castle looking over their victory (I guess), and Cao Pi breaks the awkward silence by saying "This land... everything I have accomplished... is for you, my dear". When she hears it, she smiles, but then shies away, telling him what sweet words he speaks, and that its not like him, and he scoffs, and says "I thought I'd speak my heart for once". After that, they again, look to their victory, and she holds his hand. What a beautiful ending.