Monjoin was a University Jikiso (facilities) (such as a lecture room and student dormitory) for Kidendo (the study of the histories) of Daigaku-ryo (Bureau of Education under the ritsuryo system). It was considered to be the same as Todoin (the school building for history and literature students) at the northern end of the Daigaku-ryo campus. Later, it also began to assume a function as Daigaku-besso (academic facility for nobles) of the Sugawara clan and the Oe clan, both of which inherited Monjo hakase (professor of literature) from generation to generation. It included the lecture hall called Hokudo, and Kiden zoshi (history rooms, toso - east side room, and seiso - west side room) located on the east side and the west side of the Hokudo.
As the origin of foundation, it was accepted that SUGAWARA no Kiyokimi, who went as a Japanese envoy to Tang Dynasty China, founded the Monjoin around 834 modeled after 昭文館 and 崇文館 in Tang -- On the other hand, there was another opinion that there had been a dormitory for monjosho (student of literary studies in the Imperial University) after 728 when the Monjo hakase was founded. In any event, in the days when SUGAWARA no Kiyokimi was Monjo hakase and Daigaku no kami (Director of the Bureau of Education), the rank of the Monjo hakase exceeded Myogyo hakase (Doctor of Confucian classics), which had conventionally been the highest rank -- It was considered that the ranks among the instructors were largely settled during this period. Since the head family of the Sugawara clan had produced Monjo hakase one after another, the family had a big influence on the operation of the Monjoin. When the family fortune of the Sugawara clan declined after the Shotai Incident (901), the Oe clan conversely began to occupy the post of Monjo hakase so that the clan increased its influence on the Monjoin.
After the mid Heian period, the seiso was placed under the control of the Sugawara clan and the toso was placed under the control of the Oe clan, both of which were to function also as dormitories of the clans as they were (corresponding to the Daigaku besso of the other clans.)
It was needless to say that the Monjoin was the University Jikiso, an official institution, so that it also served as a dormitory for students from the clans which did not have a Daigaku besso of their own -- Thereby, a close relationship was developed between the students and their supervisor, hakase of the Sugawara clan or the Oe clan and the students formed a kind of academic clique. When the Kidendo became inherited as hereditary learning during the insei period (the period of the government by the retired Emperor), the clans other than those inherit Kidendo became excluded and the students were taught outside the Daigaku-ryo. When the Monjoin was burnt down in a conflagration in 1177, the Monjoin was, in fact, defunct.
The Monjoin had the Hokudo which served as a lecture hall in the center, and toso and seiso which served as dormitories on both sides of the Hokudo. It was considered that classes were generally held in the Hokudo where monjosho gathered from the toso, seiso, and the daigaku besso outside the Monjoin and took the classes. Ceremonies and parties for those involved in the Monjoin were also held there.
Although it was not defined which of the toso and seiso the students were to belong at the beginning, when monjosho became Monjo tokugosho (Distinguished Scholars of Letters) and took taisaku (civil service examination), it was decided that the Monjo hakase of the so other than that the monjosho belonged to set the examination, which meant that the monjosho had to belong to either the toso or the seiso by that time. The reason was that if the hakase, who supervise the so to which the monjosho belonged, was to be the examiner, wrongdoing might be conducted during the examination. As a famous example, SUGAWARA no Michizane who belonged to the seiso took the taisaku examination in 870 from the MIYAKO no Yoshika of the toso as the setter hakase of the examination. Similarly, when Michizane assumed the post of the Monjo hakase, he set the question for the taisaku examination for Kiyoyuki (also referred to as Kiyotsura) MIYOSHI of the toso in 881, and KI no Haseo of the toso in 883.
As the division of duties was established between the Sugawara clan and the Oe clan, the so to belong was fixed for each clan.
In "Nichureki," the clans below were listed as 'juyu shichike' (famous families but not listed in the "Nichureki" were parenthesized.)
Toso: the Oe clan, the Miyoshi clan, the Ki clan, the Southern House of the Fujiwara clan, the Ceremonial House of the Fujiwara clan (the Kurajimaro line), the Northern House of the Fujiwara clan (the Uona line), the Takashina clan (the Miyako clan, the Mimune clan, the Ono clan, and so forth)
Seiso: the Sugawara clan, the Tachibana clan, the Ceremonial House of the Fujiwara clan (the Kiyonari line), the Northern House of the Fujiwara clan (the Hino line) (the Taira clan, the Shigeno clan, 善滋氏, the Sugano clan, and so forth)
The clans that belonged to the toso and the clans that belonged to the seiso respectively cooperated within their own cliques and tried to make their cliques more powerful. The tendency was to promote the formation of the academic cliques, and as a result, to promote the exclusion of the other clans and inheritance of hereditary learning.