Cixi entered the Forbidden City as a teenage concubine of the Xianfeng emperor and rose in rank when she bore his only surviving son in 1856. In 1861 the emperor died after fleeing the Anglo-French occupation of Beijing at the end of the second of the Opium Wars. The heir was five. Cixi, allied with the senior empress dowager and the emperor's brother Prince Gong, overthrew the regents the late emperor had appointed and took power as co-regent. She governed in the name of her son, the Tongzhi emperor, and, after his death in 1875, in the name of a nephew she placed on the throne as the Guangxu emperor. For nearly half a century no major decision of the Qing dynasty was made without her.
Her record is contested. She was a shrewd politician who kept a Manchu dynasty alive through the Taiping Rebellion, foreign wars and factional intrigue. In the 1860s and 1870s she supported the provincial officials who led the Self-Strengthening Movement, approving arsenals, shipyards and a foreign office. But her first concern was her own authority and that of the dynasty. She balanced reformers against conservatives so that neither grew too strong, resisted changes to the examination system and the structure of government, and allowed naval funds to be spent on her summer palace. China's defeat in the First Sino-Japanese War (1894–1895) exposed the cost.
In 1898 the Guangxu emperor, advised by Kang Youwei, launched the sweeping Hundred Days' Reform. Fearing a move against her and backed by conservative officials and the army, Cixi staged a coup, confined the emperor for the rest of his life, executed six reformers and cancelled most of the decrees. Two years later she gambled on the anti-foreign Boxer Rebellion and declared war on the foreign powers. An international army took Beijing, the court fled to Xi'an, and China was forced to pay a huge indemnity.
Chastened, Cixi then authorized the New Policies: new schools and armies, abolition of the civil service examinations in 1905, discouragement of foot binding, and a promise of constitutional government. They came too late to restore confidence. She died in November 1908, a day after the Guangxu emperor, having named the infant Puyi as successor; the dynasty fell in the Xinhai Revolution three years later.