Phayao was established around 1095 by the King of Chiang Saen, as a small city-state kingdom. By the reign of King Ngum Muang, circa 1267 it is thought to have become a very prosperous region.
In the 13th century it gained enough importance to be equal partner of King Mengrai of Lannathai and the Sukhothai kingdom. However a later king of Lannathai captured Phayao in 1338, and made it part of Lannathai.
During the Burmese rulership of Lannathai the city became deserted, and in 1897 King Rama V combined Phayao with Chiang Rai Province. On August 28, 1977 it was divided from Chiang Rai again, and again became a province of Thailand in its own right.