In the Sui Dynasty, it belonged to Zangzhou County.
The Tang Dynasty belonged to Yingzhou, Qianzhong Road.
In the Song Dynasty, the eastern section of the southern part of 56 Jixi Prefecture was under the control of Shaoqing Mansion on Kuizhou Road.
It was first built in the Yuan Dynasty. During the Yuan Dynasty, the current county territory was between Duyun Fusi and Dingyun Prefecture. In the thirteenth year of Zhizheng (1353), construction began in the territory. The imperial court set up Yaoba Chief Sui in Bagan to manage the territorial affairs of the Miao territory in the current county and Balang, Yangji and other places.
In the seventh year of Hongwu in the Ming Dynasty (1374), Chief Yaoba surrendered to the Ming court. In the thirteenth year (1380), it was changed to the Miao Yi Chief of Lawsuit. In the eighteenth year (1385), he was promoted to the pacification department of Yaoba, Mengnang Zhili, and still managed the local affairs in the original territory.
In the 11th year of the reign of Emperor Kangxi of the Qing Dynasty (1672), it was renamed Duyun Prefecture, and Balang and other places were included in Duyun. In December of the seventh year of Yongzheng (January 1730), the imperial court approved the construction of the Bazhai Hall, which is now located in Lao Bazhai. The "General Annals of Guizhou" compiled in the sixth year of Qianlong (1741) records that the jurisdiction of the department at that time was: "One hundred and ten miles from the Yangtiao Village boundary of Guzhou, Liping Prefecture in the east, and thirty miles from the Taiping flood boundary of Duyun County in the west." li, 60 li from the Sanjiang (foot) border of Dushan Prefecture in the south, 120 li from the Danjiang Tongpan Huangtu Village boundary in the north, 80 li from the Dujiang Tongpandilan Village boundary in the southeast, and Duyun in the southwest. The county's Pu'an division borders 55 miles, the northeast is 110 miles from Danjiang Danglangzhai boundary, and the northwest is 100 miles from Longli boundary of Maha Prefecture. "The office has jurisdiction over four chieftains: Yaoba Division, located in Yaoba. It led to the area of ??Yanying, Xingren, Xianning (now part of Majiang County), Shaocha, Longquan, Jijia (now part of Duyun City), Jinzhong, and Jiaoli (now part of Sandu Shui Autonomous County), totaling 60 villages. ; Yangwu Division, stationed in Zhushachang, leads the current area of ??Yangwu, Changqing, Longtang, Dangzao, and Fuxing, totaling 43 villages; Paidiao Division, stationed in Paidiao, leads today's Paidiao, Fangsheng, Jiabei, Yangwu, There were 39 villages in Yongle (now part of Leishan County) and Liuwu (now part of Leishan County) areas; Yong'an Division, stationed in Zhuozuo, led the area in present-day Xinhua, Daxing, and Nangao, with 51 villages in total. Since then, the area under the jurisdiction of the department has changed. According to the "Qiannan Shilue" compiled by Aibida, the governor of Guizhou in the 14th year of Qianlong's reign (1749), the department's administration also moved about 5 kilometers westward and was located in Longjingtang County.
The establishment of Bazhai Hall lasted until the early years of the Republic of China.
In the 30th year of the Republic of China (April 1941), the Nationalist Government withdrew from Danjiang County (Leishan), and its southwest part was merged into Bazhai. The names of Danjiang and Bazhai were named "Danzhai". "to date.
On December 4, 1949, Danzhai County was liberated. On December 6, the Danzhai County People's Government was established, under the jurisdiction of Dushan Prefecture (renamed Duyun Prefecture in November 1952). At the same time, the Chengguan Office and the People's Government of Yangwu and Xingren Districts and the People's Government of Longquan Town were established.
On April 18, 1956, the State Council approved the cancellation of Zhenyuan Prefecture and established Qiandongnan Miao and Dong Autonomous Prefecture with the approval of (56) State Construction Department Document No. 30. Yuqing County in the original Zhenyuan Prefecture was placed under Zunyi Prefecture. , the five counties of Majiang, Danzhai, Liping, Congjiang and Rongjiang in Duyun Prefecture were included in the Qiandongnan Autonomous Prefecture.
In January 1957, it was renamed Danzhai County.
In January 1959, Danzhai County was abolished and merged with Lushan, Leishan and Majiang to form Kaili County.
In August 1961, the organizational systems of Majiang County and Leishan County were restored, and the original organizational systems of Danzhai County were placed under Majiang County and Leishan County respectively.
In October 1962, the organizational structure of Danzhai County was restored.
In 1990, the county had 3 districts, one district-level town, 20 townships (towns), and 157 villages (streets).
In January 1992, with the approval of the Guizhou Provincial People's Government, the three districts of Longquan, Paidiao and Xingren were abolished; the three townships (towns) of Longquan, Jinzhong and Hexin were merged into Longquan Town, and Paidiao was merged into Longquan Town. The 7 townships (towns) of Tiao, Chahe, Kongqing, Jiapei, Yangwu, Fangsheng and Dangzao were merged into Paidiao Town, and the 4 townships (towns) of Xingren, Shaocha, Yanying and Xinhua were merged into Xingren Town. The two townships of Yangwu and Fuxing were merged to form Yangwu Township, the two townships of Changqing and Longtang were merged to form Changqing Township, the two townships of Yahui, Maqiao and Pailu were merged to form Yahui Township, and the two townships of Nangao and Daxing were merged to form Nan Gao Xiang.