According to the Yonok chronicle, Mueang Fang was built in 641 by King Lawa Changkarat. Later, King Mengrai the Great ruled over Fang before building Wiang Kumkam and Chiang Mai as successive capitals of the Lanna Kingdom, beginning in 1294.
Prior to the new capitals, Mengrai had used Mueang Fang as a base to invade Hariphunchai.
In 1910, Mueang Fang was made part of Chiang Rai Province, and named Mueang Fang district. In 1925 it was reassigned to Chiang Mai Province. In 1938 the word mueang was dropped from the name, which was then reserved for capital districts of the provinces.