In the first of a two-part series focusing on China’s hugely important national college entrance examination, or gaokao, the SCMP examines and explains the origins of the test and how it influenced not only the nation’s modern education system but those elsewhere in the world.
Each June, China’s gaokao turns the country’s classrooms into arenas of aspiration as millions of students sit an exam seen as a path to university and a better future.
Its cultural ancestor is sometimes traced to the keju, the imperial Chinese civil service examination system, which lasted over 1,300 years and allowed men outside hereditary elites to vie for government positions.
Chinese scholars generally date the origins of the keju system to the Sui dynasty (581–618), when officials began to be selected through subject-based tests rather than birth or recommendation alone.
The system was refined under the Tang dynasty (618–907), allowing educated men to register for exams themselves.
At the time, the exams were held annually and tested candidates on practical policy questions and classic literature texts.
By the Song dynasty (960–1279), it had expanded further, with broader access, higher admission numbers and greater emphasis on policy essays.
The era produced celebrated officials and writers from modest backgrounds, including Fan Zhongyan and Ouyang Xiu.
Song poet Wang Zhu captured that promise in one line, “In the morning, a farm boy; by evening, in the emperor’s hall”, reflecting the belief that learning could overcome birth.
Over the following centuries, the examination system reached its peak, but by the late Ming dynasty (1368–1644), its curriculum had become rigid.
Candidates were trained to write in the inflexible “eight-legged essay”, a formulaic style built around Confucian orthodoxy.
By the Qing dynasty (1644–1912), the exam system looked increasingly obsolete and insular as China faced growing demand for innovative talent in response to military, scientific and institutional pressures. It was abolished in 1905.
Throughout the long history of the imperial examinations, candidates faced extreme conditions.
Examination halls in the capital were often hundreds of kilometres from home, and some students set off months in advance.
Unlike modern classrooms, these cells were usually small, partitioned rooms resembling pigeon cages, each equipped with a chamber pot.
During the Qing-era provincial exams, candidates endured nine consecutive days of testing without leaving the examination hall. Eating, sleeping, and writing all took place in these cramped spaces.
Some accounts describe candidates being bitten by rats. In one sweltering examination session in Fujian province, southeastern China, four reportedly died from illness.
Cheating was a risky but sometimes tempting response to the immense pressure of the imperial examinations.
Historical records and surviving artefacts show that candidates went to extraordinary lengths to smuggle information into exams.
Essays were copied onto clothing, socks, writing instruments, candles, and even their own bodies. One anecdote also describes a student writing tens of thousands of characters in micro-script using rat whiskers.
By the Qing dynasty, techniques had become more elaborate, including passing secret notes, assuming false identities, or swapping papers.
To protect fairness, successive dynasties introduced increasingly strict anti-cheating measures.
During Wu Zetian’s reign in the Tang, candidate names were covered with slips of paper to prevent examiners from recognising their handwriting.
The Song period strengthened discipline with rigorous searches, armed guards patrolling the halls, and careful monitoring of candidates.
Before grading, scripts were manually copied to prevent examiners from identifying individual handwriting.
Under Qing law, bribery and other forms of cheating carried severe penalties.
Exam officials and candidates found guilty of corruption could face execution, while impersonators risked exile and flogging.
Success in the imperial examinations carried enormous social weight.
The zhuangyuan, the top scorer in the examination, could become a household name and, in rare cases, rise to the rank of chancellor, second only to the emperor.
Some zhuangyuan entered popular memory for more unusual reasons.
Qing dynasty scholar Li Pan was said to be tall, slow in thought and even slower in writing.
According to historical accounts, he brought 36 steamed buns into the examination hall to sustain himself, earning imperial praise as a rare example of scholarly perseverance.
The 20th century Chinese thinker Hu Shi saw the imperial examination system as one of the historical foundations of modern China.
After centuries of exposure to the keju, he wrote, Chinese society developed a durable belief that government should be run by the most capable, rather than by those born into privilege.
Officials, in this view, should be chosen through open competition among those willing to sit the exams.
Education historian Liu Haifeng has described the system as deeply ambivalent across his research.
It helped improve administration, expand schooling and strengthen state governance, but in its later years, it also encouraged factionalism, intellectual rigidity and a lifetime of wasted effort for generations of candidates.
The prestige of the imperial examination system also extended well beyond China’s borders.
From the eighth to the 15th century, neighbouring East Asian states, including Korea, Vietnam and Japan, borrowed elements of the system, adopting both its examination format and Confucian curriculum.
In 18th- and 19th century Europe, figures from Voltaire to Rousseau took note of the apparent fairness of China’s examination-based bureaucracy, according to research published on Social Sciences in China.
François Quesnay, the influential French economist, even argued that Europe should adopt a similar examination system.
At home, although the imperial examination was abolished under the Qing dynasty, its legacy persisted.
Scholars note that China’s modern gaokao, while no longer a path to officialdom, retains the ancient exams’ emphasis on talent selection, procedural fairness, and public education.