Lamphun is one of the northern provinces located in the river valley of the Ping.

Under its old name of Hariphunchai , Lamphun was the northernmost city of the Mon kingdom of the Tharavadi period,and also the last to fall to the Thai. In the late 12th century it came under siege from the Khamer, but did not fall. However in 1281 King Mengrai of Lanna finally seized the city, and made it part of his kingdom.

After Burmese expansion in the sixteenth century, Lamphun was also under Burmese rule for two centuries. In the eighteenth century, with the rise of Thonburi and Bangkok against Burmese rule, local leaders from Lampang agreed to be their allies. Lamphun was finally free from the Burmese and ruled by relative of Lampang’s leader, gaining vassal status from Bangkok. Eventually after the administrative reform of Bangkok government in late nineteenth century, Lamphun became a part, as a province, of Siam or late Kingdom of Thailand.