End of the Han dynasty
The end of the Han dynasty refers to the period of Chinese history from 189 to 220 AD, which roughly coincides with the tumultuous reign of the Han dynasty's last ruler, Emperor Xian. During this period, the country was thrown into turmoil by the Yellow Turban Rebellion (184–205). Meanwhile, the Han Empire's institutions were destroyed by the warlord Dong Zhuo, and fractured into regional regimes ruled by various warlords, some of whom were nobles and officials of the Han imperial court. Eventually, one of those warlords, Cao Cao, was able to gradually reunify the empire, ostensibly under Emperor Xian's rule, but the empire was actually controlled by Cao Cao himself. Cao Cao's efforts to completely reunite the Han empire were rebuffed at the Battle of Red Cliffs in 208 / 209, when his armies were defeated by the allied forces of Sun Quan and Liu Bei. The Han dynasty formally ended in 220 when Cao Cao's son and heir, Cao Pi, pressured Emperor Xian into abdicating in his favour. Cao Pi became the emperor of a new state, Cao Wei. A year later, in response to Cao Pi's usurpation of the Han throne, Liu Bei declared himself emperor of Shu Han; and in 229, Sun Quan followed suit, declaring himself emperor of Eastern Wu. The period from Emperor Xian's abdication in 220 to the partial reunification of China under the Jin dynasty in 265 was known as the Three Kingdoms era in Chinese history.
He Qi
After the end of the Eastern Han dynasty in 220, He Qi continued serving under Sun Quan, who became an autonomous ruler of his Eastern Wu regime in southern China. On the other hand, Cao Cao's son, Cao Pi, usurped the throne from the last Han emperor and established the Cao Wei state in northern China. Between 222 and 223, the Wu and Wei forces clashed at the Battle of Dongkou. The Wei forces led by Cao Xiu defeated the Wu navy led by Lü Fan which had just experienced a natural disaster and lost several ships. Just when the Wu forces were worried about Cao Xiu's impending attack, Wu reinforcements led by He Qi showed up at Dongkou. Since He Qi arrived behind schedule, his fleet was not affected by the storm which destroyed many of Lü Fan's ships. At the same time, as He Qi had a penchant for extravagance, his ships were all finely decorated and his troops were equipped with the best weapons. Cao Xiu was shocked when he saw He Qi's grandeur display of his refulgent fleet. Believing that the Wu fleet was more powerful, Cao Xiu ordered the Wei forces to retreat, thus sparing Lü Fan and his remaining forces from almost certain doom. When Sun Quan heard about this incident, he promoted He Qi to the position of General of the Rear (後將軍).