During the early Jin Dynasty, Xiamen was made Tong'an District in 282, a sub-entity of Jin'an Prefecture. During the Song Dynasty (960-1279 AD), the city was known as a sustainable international seaport, and the Chinese scientist and statesman Shen Kuo (1031-1095) spent some of his youth there while his father was a local bureaucrat on the government staff. In 1387, the Ming Dynasty used the place as base against pirates, and was part of Quanzhou. Koxinga, stationed here in 1650, named it Siming Island, or "Remembering the Ming", but the city was renamed by the Manchus in 1680 to Xiamen Subprefecture. The name "Siming" was changed back after the 1912 Xinhai Revolution and the settlement was made a county. Later it reverted to the name Xiamen City. In 1949, Xiamen became a provincial city, then was upgraded to a vice-province-class city, or a municipality. It was made a Special Economic Zone in 1980.
Xiamen was the port of trade first used by Europeans (mainly the Portuguese) in 1541. It was China's main port in the nineteenth century for exporting tea. As a result, Hokkien (also known as the Amoy dialect) had a major influence on how Chinese terminology was translated into English and other European languages. For example, the words "Amoy", "tea", "cumshaw", "ketchup", and "Pekoe", kowtow, and possibly Japan originated from the Hokkien.
Xiamen was one of the five Chinese treaty ports opened by the Treaty of Nanjing (signed in 1842) at the end of the First Opium War between Britain and China. As a result, it was an early entry point for Protestant missions in China.
In 1999, the largest corruption scandal in China's history was uncovered, implicating up to 200 government officials. Lai Changxing is alleged to have run an enormous smuggling operation, which financed the city's football team, film studios, largest construction project, and a vast brothel rented to him by the local Public Security Bureau. According to Time, "locals used to joke that Xiamen should change its name to Yuanhua, the name of Lai's company." They subsequently claimed that potential investors were discouraged by the taint of corruption.