The Taixue 太學 "National University" was the highest educational institution in imperial China. It was located in the capital and came into being during the Former Han period 前漢 (206 BCE-8 CE). Before, there was only private education because there was not a single educational principle considered as the orthodox one to be sponsored by the state. During the early Former Han period the prevalent philosophical system was the Huang-Lao teaching 黃老 that was influenced by Daoism and the Five Processes theory 五行. Emperor Wu 漢武帝 (r. 141-87 BCE) then decided to adopt Confucianism as state doctrine because it was one the one side the most systematic philosophical system that was able to connect the spheres of government, society and cosmology, and on the other side was the only philosophical tradition that possessed a system of regular education. This decision is called bachu baijia 罷黜百家 "expelling the hundred [non-Confucian] schools of philosophy". The Confucian scholar Dong Zhongshu 董仲舒 suggested establishing a National University in the capital Chang'an 長安 (modern Xi'an 西安, Shaanxi) where specialized professors (boshi 博士 "erudites") would teach the Five Confucian Classics (Yijing 易經 "Book of Changes", Shangshu 尚書 "Book of Documents", Shijing 詩經 "Book of Song", Liji 禮記 "Records of Rites", and Chunqiu 春秋 "Spring and Autumn Annals").
In the beginning, there were only 50 persons in the University, professors and students. Until the end of the Former Han period, majors and students increased constantly, and new professorships were founded for the two commentaries of the Chunqiu, Gongyangzhuan 公羊傳 and Guliangzhuan 穀梁傳, and the commentary and parallel tradition to it, the Zuozhuan 左傳, as well as for the Zhouguan 周官, a description of the ideal administrative apparatus, and the gloss book Erya 爾雅. At that time there were already 3,000 students enrolled at the University. The usurper Wang Mang 王莽 (r. 8-23 CE) used Confucian experts to bolster his government and therefore founded two different schools, the Biyong 辟雍 and the Mingtang 明堂 Academies located south of the city walls. These institutions were able to house 10,000 students. Until that time it was very common that the emperors chose professors of the National University to be appointed to high state offices.
When Emperor Guangwu 漢光武帝 (r. 25-57 CE) founded the Later Han dynasty 後漢 (25-220 CE) he moved the capital from Chang'an to Luoyang 洛陽 (modern Luoyang, Henan) and established the National University the Kaiyang Gate 開陽門. In 126 CE the buildings of the University were considerably enlarged so that 30,000 students (taixuesheng 太學生 or shengyuan 生員) were able to enroll. In 175 the orthodox version of the Confucian Classics was cut into stone slabs that were erected on the compound of the University. These were the Xiping Stone Classics 熹平石經 that served as the original for copies to be spread throughout the empire.
Although professors and students of the National University were to study the Classics and to remain philosophers, there were several incidents when professors, supported by a large number of students, tried to interfere into governmental affairs, like Wang Xian 王咸 who crititiced the administration of the metropolitan commandant (sili xiaowei 司隸校尉) Bao Xuan 鮑宣, or Chen Fan 陳蕃 and Li Ying 李膺 who fought against the eunuch clique, a struggle that ended in the prohibition of court factions (danggu 黨錮) consisting of state officials and scholars of the University. The eunuchs had arrested more than 1,000 students and professors.
After the demise of the Han dynasty, Emperor Wen 魏文帝 (r. 220-226) of the Wei dynasty 曹魏 (220-265) reanimated the National University, sponsored 19 chairs that instructed more than 1,000 students. It was possible to undergo an examination that qualified for appointment to the positions of clerk in the central administration (zhanggu 掌故), retainer of the heir apparent, or even gentleman of the interior (langzhong 郎中). During the Western Jin period 西晉 (265-316) there were already as much as 3,000 (or even 7,000) students enrolled at the University. Yet it was during that time that the personal qualification of applicants, expressed in the nine-rank system (jiupin zhi 九品制), was also adapted for education. For persons qualified with rank 5 and above, a higher institution was founded, the Directorate of Education (guozijian 國子監). While the Directorate was the academy of the "nobles", the University became the academy of the commoners. In the next two centuries, especially under the Southern Dynasties 南朝 (420~589), the Directorate became the institution that produced state officials on the base of the Confucian Classics, while the University became a place of research without a lot of students. In northern China, the more successful of the Sixteen States founded their own National Universities and specialized institutions like the School of Four Gates (simenxue 四門學), the local commandery and princedom schools (junguoxue 郡國學), or the Law School (lüxue 律學). Yet these institutions were only open for sons and relatives of the highest officials.
Emperor Daowu 北魏道武帝 (r. 386-408) of the Northern Wei dynasty 北魏 (386-534) who reunited northern China, founded the University of the Sons of State (guozi taixue 國子太學) but later separated them into the formerly known two institutions. For a short time, the Directorate (guozixue) was called *Drafting Academy (zhongshuxue). The emperors Xiaowen 北魏孝文帝 (r. 471-499) and Xuanwu 北魏宣武帝 (r. 499-515) founded the Primary School of the Four Gates (simen xiaoxue), so that there were three different academies at that time, the University, the Directorate, and the Four Gates School. Under the Sui dynasty 隋 (581-618), a Law School, a Calligraphy School (shuxue 書學) and a Mathematics School (suanxue 算學) were added to this group. These academic institutions were subordinated to the Directorate. Like before, it depended of the official rank of a family which institution could be enrolled at. The Law, Calligraphy and Mathematics school accepted students of official rank 8 and below, while the sons of families of a higher rank could visit the three higher institutions. While the Directorate, the University and the Four Gates School provided the Confucian Classics (philosophy and its adaption to statecraft) in their curriculum, the three lower schools were concerned with more practical matters. At the beginning of the Tang period 唐 (618-907), there were 300 students enrolled at the Directorate, 500 at the University, 1,300 at the Four Gates School, 50 at the Law School, and a mere 30 at the two others. It was common to enter a school with the age of 14 to 19 sui, at the Law School with 18 to 25.
Emperor Gaozong 唐高宗 (r. 649-683) founded a second Directorate of Education in the secondary capital Luoyang. Head of the Directorate was a Chancellor (guozi jijiu 國子祭酒), assisted by a Director of studies (siye 司業), an aide (cheng 丞) or supervisor (panjianshi 判監事), a recorder (zhubu 主簿) who was also responsible for the seals, and an office manager (lushi 錄事). The academic staff consisted of professors (boshi 博士), instructors (zhujiao 助教), teaching aides (dianxue 典學) and lecturers (zhijiang 直講). The classes were divided into students planning to pass the jinshi 進士 "presented scholar" examination and such envisaging to undergo the examination for classicists (mingjing 明經). The teaching material was divided into the the Grand Classics (dajing 大經) Liji and Zuozhuan, the Intermediate Classics (zhongjing 中經) Shijing, Zhouli 周禮 and Yili 儀禮, and the Minor Classics (xiaojing 小經) Yijing, Shangshu, Gongyangzhuan and Guliangzhuan. The Classics Lunyu 論語 "Confucian Analects" and Xiaojing 孝經 "Classic of Filial Piety" had to be studied in any case. The names of the applicants for the examinations were transmitted to the Ministry of Rites 禮部 that also later cared for a concrete appointment to a government post. In case that someone did not pass the examination several times, he was taken off the university register. During the second half of the Tang period, the examination system at the Directorate became less important for the staffing of official posts because the decentralisation of the administration impeded a sufficient recruitment of students from all over the empire.
At the beginning of the Northern Song period 北宋 (960-1126) this state continued to plague the National University. Only sons from families with a status of rank 7 and higher were allowed to enroll, and it was still subordinated to the Directorate of Education. Emperor Renzong 宋仁宗 (r. 1022-1063) complied with the suggestion of Fan Zhongyan 范仲淹 and in 1044 founded a new National University in the Xiqing Court 錫慶院 of the capital Kaifeng 開封 (modern Kaifeng, Henan) to which 200 students were enrolled. The statutes for this insitution (taixueling 太學令) followed a draft by Hu Ai 胡璦. Emperor Shenzong 宋神宗 (r. 1067-1085) raised the number of students to 2,400 and divided the University into 80 clauses (zhai 齋). He had also created more detailed statutes and divided the institution into three colleges (sanshe 三舍), namely the Outer College (waishe 外舍), the Inner College (neishe 内舍), and the Superior College (shangshe 上舍, see Three-Colleges Law sanshefa 三舍法). Emperor Huizong 宋徽宗 (r. 1100-1125) refounded the Biyong Academy as the Outer School (waixue 外學), a kind of preparatory branch of the National University. At both institutions, 3,800 students were enrolled at that time. The recruitment by examination was abolished, and appointees were selected from among the graduates directly. When the dynasty had to flee to the south, the National Academy was refounded in the new capital Lin'an 臨安 (modern Hangzhou 杭州, Zhejiang).
The institution of the National Academy was perfected during the Song period. It was now possible that sons of the officials of all grades, as well as common people, enrolled. For some time, all students enrolled obtained a stipend by the state that allowed them to be fed by the University. During the Southern Song period 南宋 (1127-1279), students of the Outer College had to provide a student fee (zhaiyongqian 齋用錢) that was reduced to 50 per cent for poor students. Students of the Inner College, as well as the student heads of the clauses became their meals for free. Students of the Outer College having passed one public (gongshi 公試) and one institutional examination (sishi 私試) were allowed to enter the Inner College. In the Inner College there was an examination all two years, and the successful participants were classified in grades according to their performance. Those obtaining the superior grade (shangdeng 上等) were allowed to "remove the commoner's dress" and could be directly appointed to a state office. Their grade was equal to that of the metropolitan jinshi graduates. Graduates passing one examination very good and the other quite well (yi you yi ping 一優一平) were exempted from the special examination by the Ministry of Rites (libu 禮部) for further promotion. And those having passed both examinations quite well (liang ping 兩平) or one examination very good and the other with mediocre performance (yi you yi fou 一優一否) were exempted of the provincial examination (jieshi 解試). Those graduates staying at the University, in the Superior College, would furthermore only be tested in institutional examinations. These were held once each month (therefore also called yuexiao 月校 "monthly test") and supervised by a member of the University or the Directorate. The public examinations werre held once every year and were supervised by a specially detached high official of the imperial court. The students of the University lived in clauses of 30 students, each clause disposing of five sleeping and studying rooms and one large hearth room that also served as a social room. A clause was headed by a clause head (zhaizhang 齋長) assisted by a clause instructor (zhaiyu 齋諭).
During the Song period the administrative positions (zhiyuan 職員, zhishiren 職事人) of instructor and lecturer were abolished and replaced by that of instructors second-class (xuezheng 學正), instructors thrid-class (xuelu 學錄), supervisors of library jianshuku 監書庫, and kitchen supervisors jianchuguan 監廚官. These officials were paid out monthly, the positions were occupied by members of the Superior or the Inner College. The University also employed craftsmen.
The National University ceased to exist after the demise of the Song dynasty, but the term taixue continued to be used as a synonym for the Guozijian until the end of imperial China in 1911. The term taixue (daxue 大學) was from 1898 on used for the newly founded modern universities.