In the Han Dynasty, it belonged to the Department of Xuanfang. In the Western Han Dynasty, the county of Beidi was transferred to Huan County, Gansu Province. Guyuan established Anding county; Ningxia is divided into Beidi county and Anding county. In the Eastern Han Dynasty, the county administration of Anding was moved to Zhenyuan County, Gansu Province, and the county administration of the northern region was moved to the southwest of Litong District, Wuzhong City.
The Sixteen States was the territory of the Great Xia State founded by Helienbo, the chief of the Iron Buddha Department of Xiongnu.
The Northern Wei Dynasty and the Northern Zhou Dynasty continued to promote the migration of villages, which was again effectively developed, and Ningxia began to be called "North and South of the border".