The imperial examination (Chinese: 科舉) was a civil service examination system in Imperial China administered for the purpose of selecting candidates for the state bureaucracy. The concept of choosing bureaucrats by merit rather than by birth started early in Chinese history, and the first earnest use of written examinations as a method of recruitment appeared under the Sui dynasty (581–618). Its systematic implementation began during the Tang dynasty (618–907), when examinations became a regular channel for bureaucratic appointment and the dominant path to high office. It was further expanded during the Song dynasty (960–1279). The system lasted for 1,300 years until its abolition during the late Qing dynasty reforms in 1905. The key sponsors for abolition were Yuan Shikai, Yin Chang, and Zhang Zhidong. Aspects of the imperial examination still exist for entry into the civil service of both China and Taiwan.
The exams served to ensure a common knowledge of writing, Chinese classics, and literary style among state officials. This common culture helped to unify the empire, and the ideal of achievement by merit gave legitimacy to imperial rule. The examination system played a significant role in tempering the power of hereditary aristocracy and military authority, and in the rise of a gentry class of scholar-bureaucrats.