Little is known of Taiwan's early history. Between the late 14th and the 17th century the island was held in part and at various times by Chinese and Japanese pirates and outlaws and by Dutch, Portuguese, and Spanish traders. The Portuguese named the island “Formosa,” meaning “beautiful,” and for many centuries it was known by that name in the West.

From 1683 until 1895 Taiwan was held by the Manchus as part of China. In 1895, after the Sino-Japanese War, China ceded the island to Japan. In 1945, following World War II, the Allied powers restored Taiwan to China.

In 1949, the Chinese Nationalists under Chiang Kai-shek transferred their government to Taiwan upon being forced off the mainland by the Communists. The United States supported Chiang's regime by stationing its Seventh Fleet in the Taiwan area and providing military and economic aid.

In 1958, the Nationalist-held islands of Quemoy and Matsu, offshore from mainland China, underwent heavy shelling by the Communists, but no invasion was attempted.

The occupation of Taiwan by the Nationalists led to rapid industrial development of the island. Land reform created a prosperous class of small landowners. By 1965, when United States economic aid ended, Taiwan had one of the most thriving economies in Asia. Although the Republic of China had lost the mainland, it continued to hold the China seat in the United Nations until 1971, when it was expelled in favor of Communist China. Soon afterward, many countries broke diplomatic relations with Taiwan. President Chiang Kai-shek, who had been the dominant figure in the government, died in 1975. His son, Chiang Ching-kuo, was premier from 1972 to 1978 and president from 1978 until his death in 1988.

In 1978 the United States recognized Communist China and broke diplomatic relations with Taiwan. United States ties with the country, however, were maintained through the privately owned but government-supported American Institute on Taiwan.

In 1994, the constitution was amended to allow for the direct election of the president. Lee Teng-Hui won the first such election, in 1996. He was succeeded in 2000 by Chen Shui-bian, a long-time advocate of Taiwanese independence. The election of Chen of the Democratic Progressive Party (DPP) ended 50 years of rule by the Nationalist Party. In 2001, elections for the Legislative Yuan, the DPP won a majority of seats. Chen was reelected president in 2004 by a slim margin after surviving an assassination attempt the day before the election. Also in 2004, an alliance led by the Nationalists won a majority of seats in elections for the Legislative Yuan.