Succession to the imperial throne was hereditary within the ruling house but not governed by a single fixed rule across Chinese history: some dynasties favored strict primogeniture, others allowed the reigning emperor considerable latitude to designate a preferred son, and periods of instability produced succession struggles, regencies under empresses dowager, and, on occasion, usurpation by powerful ministers or generals who founded new dynasties of their own, events later legitimated retroactively through Mandate of Heaven reasoning.
The office endured, in one dynastic form or another, for more than two thousand years, making it among the longest-running heads of state in world history under a single continuous political concept even as ruling families changed repeatedly. It ended formally on February 12, 1912, when the Empress Dowager Longyu, acting as regent for the child Xuantong Emperor, Puyi, issued an edict of abdication amid the Xinhai Revolution, establishing the Republic of China and ending the imperial system. Puyi briefly returned to the throne in a failed 1917 restoration attempt and later served as the Japanese-installed puppet emperor of Manchukuo from 1934 to 1945, an episode generally treated by historians as a distinct political creation rather than a genuine continuation of the historic Chinese imperial office.