Re. the two brothers, must summarize from start cos some events were crucial in the build-up...
Before Cao Cao's death, Cao Pi and Cao Zhi were potential successors. The latter was more favoured by Cao Cao in the beginning, as he was pretty smart since young (not only in poems hor) and with the help of Yang Xiu and another adviser (cant rem his name liao), Cao Zhi slowly shined as a minister.
In tears, Cao Pi seeked help from a minister, Jia Xue (a high scholar), and the adviser told him to stay patient as Cao Zhi would screw up eventually owing to his love for wines.
Just a day or so before Cao Army marched on to a crucial battle, Cao Pi brought some wines to Cao Zhi and said some stuffs to lower his guard. Being over-confident with his own ability, Cao Zhi invited his two advisers (Yang Xiu and the other) for Cao Pi's wines, and they drank, got drunk and even danced merrily to their heart's contents.
Cao Zhi didn't wake up on time for the march, and missed it. Thereafter, Cao Cao heard from his men abt Cao Zhi's drunken stupor and dismissed him as the successor liao.
After Cao Cao's death, Cao Pi smoothly arose to the throne, but in his mind, he felt that Cao Zhi would be a thorn to his plans and wanted to find the opportunity to get rid of him. Well, Cao Pi had gotten rid of his two advisers beforehand liao... and he also wanted to get rid of another brother (Cao Zhang). Fortunately, Cao Zhang was a plain fighter and didn't possess much wits. So, he wasn't a threat to Cao Pi.
Then, he "invited" Cao Zhi over for some issues (in my vague memory, i think it was abt Cao Cao's funeral as described by HBH), and wanted him to atone for his mistake by creating a poem in seven steps. If he succeeded, he would be let off (Cao Pi confidently thought he couldn't).
Cao Zhi managed to do it, and shocked Cao Pi (nope, don't think he was moved, he was ready to execute Cao Zhi... but he had to fulfil his promise). Cao Pi, henceforth, delegated a governor's role to Cao Zhi in a faraway town so that at least, he felt that the latter wouldn't be a threat to his throne....
and the 'soya beans' poem was famously passed down from gens to gens because Cao Zhi actually didn't have any intention of a revolt because they were flesh and blood brothers, no matter what. But, Cao Pi was just plain vicious and as paraniod as his father.
Feel free to correct me if i'm wrong.