Cao Cao was born in 155 AD, a subject of the dynasty of Later Han. His father, Cao Song, was the adopted son of a eunuch at court, and rose through influence and bribery to the highest position in the imperial bureaucracy. Cao Cao himself occupied a number of middle-range posts at the capital until 189, when the general Dong Zhuo took advantage of a failed coup d'etat and claimed power for himself.
The civil war which followed destroyed the authority of the empire, and for ten years the heart of China was ravaged and ruined by ragged armies of adventurers, in an infinite permutation of alliances and treachery.
From this confusion, Cao Cao emerged in triumph. He established a coherent government with the Emperor as his puppet, and by 200, when he defeated his chief rival in battle by the Yellow River, he was the master of north China.