Mashan county is located at the northern foot of Daming Mountain in the middle of Guangxi Zhuang Autonomous Region, on the south bank of Hongshui River, bordering Xincheng County and Shanglin County in the east. It faces Pingguo County in the west, Wuming County in the south and Du 'an Yao Autonomous County in the north across the Hongshui River.
The county has jurisdiction over 7 towns of Baishan, Bailongtan, Guling, Chai Jin, Zhou Lu, Linxu and Yongzhou, and 4 townships of Guzhai, Fang Jia, Lidang and Li Qiao. There are 145 villagers' committees, 6 community neighborhood committees and 300 1 natural villages.