Xuantu Commandery (Chinese:玄菟郡) was a commandery (administrative district) established beyond the far eastern pale (遼東) of HanChina. It was one of Four Commanderies of Han, established in 107 BCE, after the Han dynasty invaded Wiman Joseon of Korea. Korean kingdom of Goguryeo rose in this area in competition with the Chinese over the region. Although Goguryeo gained full control over the general region in 302, Later Han had already lost the earlier territory of Xuantu, which retreated to Liaodong Peninsula in the 1st century CE. The populations of the respective prefectures were greatly reduced after they were transferred to Liaodong, but their prefectural identities were preserved albeit nominally.
In 82 BCE, the Han dynasty reduced its commandery units; Lintun Commandery merged with Xuantu as a result. In 75 BCE, the Xuantu Commandery was forced to moved its seat from Fort Okjeo (沃沮城) to Gaogouli County due to raids by the Maek tribes (貊), a likely reference to Gaogouli. As a result, some of its previous prefectures had now to be abandoned or reassigned, seven of which were subject to Lelang Commandery, the so-called "seven prefectures beyond the eastern pass" (嶺東七縣). As a result of the change, only three prefectures remained under Xuantu Commandery: Gaogouli County (高句驪), Shangyintai (上殷台) and Xigaima (西蓋馬).
The Book of Han records 45,006 households and 221,845 individuals in Xuantu Commandery for year 2 CE.
When General Sima Yi of Cao Wei conquered Gongsun Yuan in his military campaign against Liaodong in 238, there remained only four prefectures in the new Xuantu Commandery that had retreated west (present-day Fushun): Gaogouli (高句麗), Gaoxian (高顯), Liaoyang (遼陽), and Wangping (望平). These would all fall within the influence of the fast-growing state of Goguryeo within the next century, and Goguryeo would end up ruling much of the previously Han-occupied part of the Northern Korean Peninsula.
^Charles Roger Tennant (1996). A history of Korea (illustrated ed.). Kegan Paul International. p. 22. ISBN0-7103-0532-X. Retrieved 2012-02-09. Soon after, the Wei fell to the Jin and Koguryŏ grew stronger, until in 313 they finally succeeded in occupying Lelang and bringing to an end the 400 years of China's presence in the peninsula, a period sufficient to ensure that for the next 1,500 it would remain firmly within the sphere of its culture. After the fall of the Jin in 316, the proto-Mongol Xianbei occupied the North of China, of which the Murong clan took the Shandong area, moved up to the Liao, and in 341 sacked and burned the Koguryŏ capital at Hwando. They took away some thousands of prisoners to provive cheap labour to build more walls of their own, and in 346 went on to wreak even greater destruction on Puyŏ, hastening what seems to have been a continuing migration of its people into the north-eastern area of the peninsula, but Koguryŏ, though temporarily weakened, would soon