During the Spring and Autumn Period, the province belonged to the State of Qin and Xirong. There are Mianzhu (near Tianshui), Luanrong (southwest of Tianshui), Ji Rong (south of Gangu County), Yiqurong (Qingyang, Gansu, Liupanshan, Guyuan, Ningxia Hui Autonomous Region), Zhai (now Lintao County) and Yi (north of Longxi County) in Xirong. These Rong people still maintain the habit of "taking the country as their surname". Although they claim to be a country, they are actually still in the primitive society stage. Xirong is adjacent to Qin. In order to expand its power, Qin, which was just founded in 770 BC, set its sights on Xirong. But several conquests against Rong failed. In Qin Wugong, due to the strengthening of centralization, the power expanded rapidly, and Mianzhu, Luan Rong, Yi Qurong, Zhai,, were conquered and annexed successively. In order to control the newly opened areas, Qin began to build counties in these areas. In 688 BC (the tenth year of Qin Wugong), the State of Qin established Yun County (south of today's Shuimaiji District) and Ji County (now Gangu County) in the conquered Ronghe area. These are the earliest two counties in Gansu history.
During the Warring States Period, the territory of the State of Qin had reached the southeast of Gansu. The Rong tribes such as Mianzhu, Yiqu, Zhai and Si, which were conquered by Qin Wugong, gradually grew up while Qin was busy fighting for hegemony, which forced Qin to fight for hegemony with considerable strength. In 320 BC, Qin sent troops to attack Yiqu (now the east of Qingcheng County), and in 3 14 BC, Yiqu attacked again and won 25 cities. By the time of Qin, Yi Qu and other Rong were finally merged by Qin, and a county was established to strengthen the rule. In the twenty-seventh year of Qin Zhaowang (280 BC), Longxi County was established, and in the thirty-fifth year of Qin Zhaowang (272 BC), Beidi County was established.