The Gukjagam, known at times as Gukhak or Seonggyungwan, was the highest educational institution of the Korean Goryeo dynasty. It was located at the capital, Gaegyeong (modern-day Kaesong), and provided advanced training in the Chinese classics. It was established in 992 during the reign of Seongjong. Its name has been changed to Songgyungam in 1298 and to Songgyungwan in 1308. Its current name is Koryo (/Goryeo) Songgyungwan University/University of Light Industry. A similar institution, known as the Gukhak, had been established under Unified Silla, but it was not successful.
The Gukjagam was part of Seongjong's general program of Confucian reform, together with the gwageo civil service examinations and the hyanggyo provincial schools. It formed the cornerstone of the Confucian educational system he envisioned. In the waning days of Goryeo, the Gukjagam again became a centerpiece of reform through the policies of the early Neo-Confucian scholar An Hyang.
In the beginning, the Gukjagam provided a total of six courses of study. Of these, three divisions were restricted to children of the highest-ranking officials: Gukjahak, Taehak, and Samunhak. These were a total of nine years long, and focused on the Confucian classics.
The other three divisions were open to children of officials as low as the 8th rank: Seohak (secretarial training), Sanhak (arithmetic), and Yulhak (law). Each of these took six years to complete, and focused on technical training with a heavy admixture of the classics.
A seventh division was added in 1104, in the reign of Yejong: Gangyejae (), providing military training. This was the first recorded occasion of a Korean dynasty providing formal training in the military arts. Due to tensions between the aristocracy and the military, it was soon removed from the curriculum, in 1133.
Seongjong's original edict of 992 provided land and slaves to support the school. However, the tuition remained prohibitive for most students not from wealthy families. In 1304, An Hyang levied a new tax which officials of the top 6 ranks had to pay in silver, and those of the lower ranks in cloth. This tax was used to defray the cost of tuition for the Gukjagam's students.
The name was changed to Gukhak in 1275, upon the ascension of King Chungnyeol. It was changed to Seonggyungam in 1298 and to Seonggyungwan in 1308, but then reverted to Gukjagam during the reign of Gongmin in 1358. The Seonggyungwan name was adopted again in 1362, and continued in use until the fall of Goryeo thirty years later.