Hanyuan County, belonging to Ya'an City, Sichuan Province, is located in the south west of Sichuan Province, with geographic coordinates between 102°16′-103°00′ east longitude and 29°05′-29°43′ north latitude. It is adjacent to Jinkouhe District of Leshan City and Hongya County of Meishan City in the east, Ganluo County of Liangshan Yi Autonomous Prefecture in the south, Luding County of Ganzi Tibetan Autonomous Prefecture and Asbestos County of Ya'an City in the west, and Xingjing County of Ya'an City in the north; the whole area is 71.4 km long from east to west, and 70.1 km wide from north to south. The county covers an area of 2,382 square kilometers and has a subtropical monsoon humid climate with warm winters and cool summers and four distinct seasons. As of 2019, Hanyuan County has 21 townships (5 minority townships) under its jurisdiction, with the county seat in Fulin Township. According to the seventh census, as of 00:00 on November 1, 2020, the resident population of Hanyuan County was 285,558 people.
The ancient name of Hanyuan County was Baidu, belonging to the State of Shu. In the fifth year of King Shenliang of Zhou (316 B.C.), Qin destroyed the State of Shu and set up Shu County, which was under the jurisdiction of Shu County. In the fourth year of Sui Renshou (604), Hanyuan County was set up in today's Jiuxiang Town under the name of Hanyuan. Qing Yongzheng seven years (1729), renamed Qingxi County. In the third year of the Republic of China (1914), it was renamed Hanyuan County again because Qingxi County had the same name and sound as Qingxi County in Guizhou Province.On December 6, 2019, it was selected as a pilot unit for the whole-county promotion of the quality of national farmers' cooperatives.On July 29, 2020, it was selected to be on the list of the 2019 re-confirmed national hygienic townships (county towns).
In 2023, Hanyuan County realized a gross regional product of 15.529 billion yuan, with a growth rate of 6.0%.