Known in ancient times as Yazhou, literally "cliff state or prefecture", Sanya's boasts a history of more than 2000 years. Due to its remoteness from the political centers during the Imperial China eras on Mainland China, Sanya was sometimes called Tianya Haijiao, meaning "the end of the sky and ocean" or "the end of the earth". As a result, the city served as a place of exile for officials who found themselves out of favor with the country's rulers.
In the 3rd year of the Republic of China (1912), Sanya was changed from Yazhou into Yaxian County.
On May 19, 1984, Yaxian County was renamed as Sanya City (county level) by the State Council.
Approved by the State Council of China, Yaxian was upgraded to Sanya City on September 26, 1987 and on December 30, Sanya City was officially established.