日本語
5,000 YEARS OF CHINA
Chinese History Timeline

From Neolithic villages to the modern state — dynasties, people and events of Chinese history in one timeline.

The Imperial Examinations (Keju)

The keju was the examination system for choosing China’s officials, begun under the Sui and lasting some 1,300 years until the Qing abolished it in 1905. Its name means “selection by subjects”: officials were chosen not by birth but by examination results — a rare system in the world of its time. Because success could bring even a man from a poor family high rank and wealth, countless men devoted their lives to study.

IN SHORT: THE MING–QING SEQUENCE
County exam (shengyuan) → provincial exam (juren) → metropolitan exam (gongshi) → palace exam (jinshi)
The top scorer in the palace exam was the “zhuangyuan.” Only a tiny fraction of candidates made it all the way.

History: from the Sui to the Qing

Sui
Emperor Wen abandoned the nine-rank system, which chose officials by family, and began selecting them by examination. The jinshi degree was created under Emperor Yang — regarded as the beginning of the keju. More →
Tang
The jinshi degree became the most prestigious, but only a few dozen passed each year. Even after passing, family and recommendations counted, and the aristocracy remained strong. Wu Zetian introduced military examinations to choose officers. More →
Song
Taizu, Zhao Kuangyin, began the palace examination held by the emperor himself; later, candidates’ names were sealed and answers recopied so handwriting could not be recognized, making the exams far fairer. Officials who had passed — the scholar-officials — came to run the state. More →
Yuan
Under the Mongol dynasty the exams were suspended for a long time; revived in 1315, they passed only a few candidates. More →
Ming & Qing
The sequence of county, provincial, metropolitan and palace exams became fixed, and candidates had to write the “eight-legged essay,” a rigid form based on Zhu Xi’s Neo-Confucianism. The number of candidates swelled into the millions. More →
1905
The Qing, hurrying to modernize, abolished the examinations, ending some 1,300 years of history. More →

The stages of the Ming–Qing exams and their titles

Under the Ming and Qing, when the system was most fully developed, candidates had to win through four stages in turn. Each level of success brought a title that was itself a social rank.

ExamWhere and whenTitleNotes
1. County exam (tongshi)County, prefecture and provincial education officials; twice every three yearsShengyuan (“licentiate,” also xiucai)Passing gave the right to sit the provincial exam and privileges such as exemption from labor service
2. Provincial exam (xiangshi)Provincial capitals (examination halls); once every three years, in autumnJuren (“recommended man”)The hardest hurdle. Simply becoming a juren made one a local notable, with a path to office
3. Metropolitan exam (huishi)The capital (Beijing); spring of the following yearGongshi (“tribute scholar”)The juren of the whole country gathered for it
4. Palace exam (dianshi)The palace; right after the metropolitan examJinshi (“presented scholar”)Set in the emperor’s name; no one failed — it only decided the ranking

Questions centered on the Four Books, such as the Analects and Mencius, and the Five Classics, and answers had to follow the commentaries of Zhu Xi of the Southern Song. From the Ming on, candidates wrote the “eight-legged essay,” a strict form built of parallel passages; because conformity to form mattered more than content, it later became a byword for empty writing.

Cheating, fraud and harsh punishment

With a family’s fortunes riding on the result, cheating never stopped. Miniature books copying the Four Books and Five Classics in characters the size of rice grains, and “cheat shirts” with model answers written all over the lining, survive to this day. Candidates were searched minutely at the entrance — even steamed buns were broken open to check inside. Answer papers had the names sealed over with paste and were copied out by clerks before marking, so that no one could tell whose paper it was from the handwriting.

Punishment for fraud was severe. In 1858, when the swapping of successful candidates in the Beijing provincial exam came to light, the official in charge, Grand Secretary Baijun, was executed the following year. That even an official of near-chancellor rank could be put to death shows how much the fairness of the examinations mattered to the prestige of the state.

Those who passed, and those who kept failing

Passed — and changed history
The Northern Song reformer Wang Anshi, his rival Sima Guang, author of the Comprehensive Mirror in Aid of Governance, and the poet Su Shi were all jinshi. Zhu Xi, founder of Neo-Confucianism, became a jinshi at nineteen. Wen Tianxiang, who fought the Yuan to the end of the Southern Song, was a zhuangyuan.
Kept failing — and changed history
Hong Xiuquan of the late Qing failed the first stage of the examinations repeatedly, and amid that despair claimed to have had visions influenced by Christianity and founded a religious society — which became the Taiping Rebellion that shook the Qing. Huang Chao, who led a great rebellion at the end of the Tang, is also said to have been a salt smuggler who had failed the examinations.
Passed — and lost his mind for joy
The Qing novel The Scholars tells of Fan Jin, who finally passes the provincial exam after the age of fifty and goes mad with joy the moment he hears the news. It is fiction, but as a biting portrait of people who gave their lives to the examinations it appears in Chinese school textbooks.

Frequently asked questions

What do zhuangyuan, bangyan and tanhua mean?
The top three in the palace examination: first place was the zhuangyuan, second the bangyan and third the tanhua. These three formed the “first class” and received the special title “jinshi with distinction.” A zhuangyuan, the nation’s top scholar, came only once every three years — such an honor that commemorative gates were built in his hometown. In China today “zhuangyuan” still means the top scorer in each province in the university entrance exam.
How hard was it to pass?
It varied greatly by period and region, but under the Ming and Qing the narrowest gate was the provincial exam: in Jiangnan (Nanjing), with its many candidates, nearly 20,000 might sit it in a year with just over 100 passing. Final jinshi numbered roughly 200–300 per round under the Qing. Many kept trying for decades, and gray-haired old men could be seen sitting beside young candidates.
How long did the exams last, and where were they held?
The provincial and metropolitan exams had three sessions of two nights and three days each — about nine days in all. Candidates sat in individual cells in the examination hall, where they also ate and slept. Each cell was about the size of a single tatami mat, with boards laid across to serve as desk and seat. The Jiangnan Examination Hall in Nanjing had over 20,000 cells, part of which survives today as a museum.
Could anyone sit the exams?
In principle any man could, regardless of family. Women could not, and certain groups such as actors and bondservants were excluded, as were those in mourning for a parent. And years devoted to study required money, so in practice most successful candidates came from well-off families of landlords or merchants.
Did Japan have the examinations?
Japan adopted the ritsuryō legal system through its embassies to the Sui and Tang and created an examination system for officials too, but in practice appointment by family prevailed and nothing like the Chinese keju took root (the eunuch system was not adopted either). On the Korean Peninsula (Goryeo and Joseon) and in Vietnam, by contrast, examinations were held in earnest. Abe no Nakamaro, who went to Tang China, is said to have passed the Tang examinations and become an official.

More topics