The name Songkhla is actually the Thai corruption of Singgora (Jawi: سيڠڬورا); its original name means "the city of lions" in Malay(not to be confused with Singapura). This refers to a lion-shaped mountain near the city of Songkhla.

Songkhla was the seat of an old Malay Kingdom with heavy Srivijayan influence. In ancient times (200–1400 CE), Songkhla formed the northern extremity of the Malay Kingdom of Langkasuka. The city-state then succeeded as the Sultanate of Singgora, it later became a tributary of Nakhon Si Thammarat, suffering damage during several attempts to gain independence.

Archaeological excavations on the isthmus between Lake Songkhla and the sea reveal that in the 10th through the 14th century this was a major urbanized area, and a center of international maritime trade, in particular with Quanzhou in China. The long Sanskrit name of the state that existed there has been lost; its short Sanskrit name was Singhapura("Lion City") (not to be confused with Singapura), a city state. The short vernacular name was Satingpra, coming from the Mon-Khmer sting/steng/stang (meaning "river") and the Sanskrit pura ("city").[5]:320-321 The ruins of the important port city of Satingpra are just few kilometres north of Songkhla city.[6]

Since the 18th century, Songkla has been firmly under Thai suzerainty. In 1909, Songkhla was formally annexed by Siam as part of Anglo-Siamese Treaty of 1909, negotiated with the British Empire, in which Siam gave up its claim to Kelantan in return for Britain recognizing Siam's right to the provinces north of that.

In the 18th century many Chinese immigrants, especially from Guangdong and Fujian, came to the province. Quickly rising to economic wealth, one of them won the bidding for the major tax farm of the province in 1769, establishing the Na Songkhla (from Songkhla) family as the most wealthy and influential. In 1777 the family also gained political power, when the old governor was dismissed and Luang Inthakhiri (Yiang, Chinese name Wu Rang (呉譲)) became the new governor. In 1786 the old governor started an uprising, which was put down after four months. The position was thereafter inherited in the family and was held by eight of his descendants until 1901, when Phraya Wichiankhiri (Chom) was honorably retired as part of the administrative reforms of Prince Damrong Rajanubhab. The family's former home was converted into the Songkhla National Museum in 1953.

Songkhla was the scene of heavy fighting when the Imperial Japanese Army invaded Thailand on 8 December 1941 and parts of the city were destroyed.