Imperial Examination System
The Imperial Examination System (Kējǔ Zhìdù) was Imperial China's main way to choose candidates to join the government. It was established by the Sui Dynasty (605 AD) all the way 'till the Qing, officialy abolished in 1905. The system was open to any male (some ethnic groups excluded) to join governance and required people to understand Confucian classics, poetry and write meaningful essays.
Because of the merit-based nature of the system, historically peasants could climb the government ranks and make a name for themselves. (in theory, Chinese peasants had little to no educational resources available to become knowledgeable though it did on occasion happen)
Structure
There were four tiers, County-level Exams (Tóngshì) which any male could partake in was the first tier. (except merchants, actors and some ethnic groups). Next was the Provincial Exam (Xiāngshì), then the Metropolitan Exam (Huìshì) and lastly the Palace Exam (Diànshì), with the last making you an elite of the bureacracy. Finishing a tier also meant you could, at any later point in your life, decide to climb up to the next.
Recording
Tiers by candidates were kepy track by the Ministry of Rites (later Ministry of Personnel) and candidates were required to give family record (jíguàn), physical descriptions, local officials vouching or recognizing a candidate who's already passed and passing candidates were given the Certificate of Admission (zhǔnkǎozhèng). Lists of successful examinees (bǎng) were also publicly available and stored in the national archive.Titles
Passing each exam was extremely prestigious and gave citizens who did so special, lifetime privileges alongside actual jobs. Keep in mind that the vast majority of candidates if they even passed remained their title due to the fierce amount of competition present.
Xuicai
The lowest and thus the most common title of the three is Xuicai. There are more, but the ones I'll cover are the most important ones. It made one eligibile to take higher exams, allowed one to wear robes reserved for scholars, exempted one from doing corvée (unpaid, forced) labor and meant that you were literate and had basic Confucian knowledge. The majority of Xuicai remained teachers or clerks.
Juren
Juren (Recommended Man) was awarded after passing the Provincial Exam and made one eligible for mid-level bureacratic work like county magistrates, gave certain tax exemptions, legal immunity (couldn't be tortured/arrested without official approval) and gave social prestige with families often trying to fancy Juren into marrying their daughters. The chances of passing the Provincial Exam was around 1%.
Jinshi
Jinshi (Advanced Scholar) was awarded after passing the Metropolitan and Palace Exams. The Jinshi had 3 classes, the first class further divided into the Elite Trio, the top 3 most-scoring then-Juren of the Palace Exam. These men were immediately put into high-ranking appointments with direct access to the Emperor and recieved special honors, one of these being is to be able to parade around Beijing on a white horse. These men also often became ministers or governers and had less trouble being promoted. Hometowns gained high respect if one of their men became part of the Trio.
Second + Third Class
The Second Class of the Jinshi were the 4th to ~100th (depends on dynasty) top participants and were assigned to mid-to-high offices like prefectural judges and many entered the Hanlin Academy, an academy specifically reserved for top scholars. The Third Class where the ~100th to the ~300th top graduates which were made county magistrates or secretaries with some becoming teachers if government posts were too overpopulated.
County-level Exams
The first exam of the County-level Exams was the County Exam (Xiànshì) and was administered and handled by the county magistrate, where participants were tested on basic Confucian classics, their ability to write essays (e.g. explaining basic confucian ideas) and composing of poetry.
Next was the Prefectural Exam (Fǔshì), which was conducted by the prefectural governor with more or less the same format as described above but more competitive, with only the best-of-the-best passing. Candidats, if they passed, became Tongsheng (Budding Scholars).
To become a Xuicai, the highest title of the first tier of exams, one first had to pass the last of the three, that being the Yuànshì or the Academy Exam supervised by the Provincial Education Commissioner. Most failed to become Xuicai, with only 1 or 2% of total Tongsheng passing. Many became 'Lifetime Tongsheng', people who repeatedly tried and failed to pass the Yuànshì and died a Tongsheng.
Provincial Exams
Xuicai often took these exams when they were around 20-40 years old, though some tried (and died before passing) to repeatedly take it with fail. The exams were held over three sessions totaling 9 days which took place during august-september or the Autumn Exams (Qiuxiang). The first session had you write an essay on Confucian classics, the second essays on governance and current political issues and the third composing of poetry. Those who graded the papers did so with the names sealed to make favoritism harder.
Passing granted the title of Juren and allowed you to pass onto the next set of exams. Again, only 1-2% of Xuicai passed with the top scorer being awarded with the title of Jieyuan.
Conditions
The Eight-Legged Essay was a style of writing, mandatory during the Ming Dynasty and broke the essay into 8 sections, that being opening, amplification, preliminary exposition, initial argument, central argument, latter argument, final argument and conclusion in that order. These essays had to be around 300-700 characters and having more meant failure.
The sessions were conducted in tiny, open-air cells (Hàoshè) that intentionally isolated the participant from the outside world complete with guards and forced participants to write through heat, rain, insects and fatigue among other things. Candidates could literally not go outside during sessions and had to pee, eat, poop and sleep in the same cell with participants dying not being something unheard of.
Conditions were inhumane because, according to various dynasties, suffering builds character and Confucian ideals emphasized hardship being a virtue.
Metropolitan Exams
Metropolitan exams (Huìshì/Gongshi) were held in the capital every three years and (usually) took place during spring, administered by the Ministry of Rites. The Huìshì also existed out of three sessions with the first session essays on Confucian classics, the second analysis of government policies and providing feedback or solutions to government issues and the third sessions where one needed to compose poetry.
Only 300 out of thousands passed and guaranteed a mid-level bureacratic post. Fraud or cheating could (depending) result in execution and conditions were identical to the provincial exams.
Palace Exams
The Palace Exams or Diànshì was personally administered and supervised by the emperor of China, taking place in the imperial palace (oftentimes in the Hall of Supreme Harmony located in the Forbidden City). Held every 3 years after the Metropolitan Exams and existed out of three parts, essays on Confucian classics, the second on soltions to policy and the third to showing off calligraphy and style of writing.
Exams were graded by the emperor and high-ranking government officials and was less harsh on the body than the Metropolitan or Provincial exam, though in turn you had the emperor of China himself staring at your handwriting and making a mistake could ruin your career. Even attending Jinshi, if the emperor disliked your answers, could have their ranking be demoted on the spot and be blacklisted from important posts regardless of your status.