The recorded history of Taipei begun with the Han Chinese settle in the Taipei Basin in 1709, and lead to the current High-tech capital that is nowadays Taipei City. Notable others dates are the annexation of Taiwan by Japan, which made Taipei start its rapid growth, and in the 1950s USA provided financial help to the ROC's dictatorial but efficient government, which allowed the city to start a fast structural and industrial growth, leading to the current high-tech world leadership.
First settlement
The region known as the Taipei basin was home to Ketagalan tribes before the 18th century. Han Chinese began to settle in the Taipei Basin in 1709.

In the late 19th century, the Taipei area, where the major Han settlements in northern Taiwan and one of the designated foreign trade port, Tamsui, were located, gained economic importance due to the boosting foreign trade, especially that of tea exportation.
First Chinese official development
In 1875, the northern part of Taiwan was separated from Taiwan Prefecture (台湾府) and incorporated into the new Taipei Prefecture (台北府). Having been established adjoining the flourishing townships of Bangkah and Twatutia, the new prefectural capital was known as Chengnei (城内), "the inner city", and government buildings were erected there. From 1875 (during the Qing Dynasty) until the beginning of Japanese rule in 1895, Taipei was part of Tamsui County (淡水县) of Taipei Prefecture and the prefectural capital. Taipei remained a temporary provincial capital before it officially became the capital of Taiwan in 1894.
Japanese rules and leadership
As settlement for losing the Sino-Japanese War, China ceded the entire island of Taiwan to Japan in 1895. After the Japanese takeover, Taipei, called Taihoku in Japanese, emerged as the political center of the Japanese Colonial Government. Much of the architecture of Taipei dates from the period of Japanese rule, including the Presidential Building which was the Office of the Taiwan Governor-General (台湾总督府). During the Japanese rule, Taihoku was incorporated in 1920 as part of Taihoku Prefecture (台北州-Tai Bei Zhou). It included Bangka (艋舺-Meng Jia), Dadaocheng, and Chengnei among other small settlements. The eastern village Matsuyama (松山庄-Song Shan Zhuang) was annexed into Taihoku City in 1938.
Nationalist rule
Upon the Japanese defeat in the Pacific War and its consequent surrender in August 1945, Taiwan was taken over by Chinese Nationalist troops. Subsequently, a temporary Office of the Taiwan Province Administrative Governor (台湾省行政长官公署) was established in Taipei City, but the behaviour of soldiers lead to increasing tensions, and to the 228 incident.
On December 7, 1949, the Kuomintang (KMT) government under Chiang Kai-shek established Taipei as the provisional capital of the ROC after the Communists forced them to flee mainland China. Taipei was also the capital of Taiwan Province (台湾省) until the 1960s when the provincial administration was moved to Chunghsing Village (中兴新村) in central Taiwan. (The PRC does not recognize this move and still regards Taipei as the provincial capital of Taiwan.)
As approved on December 30, 1966 by Executive Yuan, Taipei became a centrally administered municipality on July 1, 1967.
In the following year, Taipei City expanded again by annexing Shilin, Beitou, Neihu, Nangang, Jingmei, and Muzha.
In 1990, 16 districts in Taipei City were consolidated into the current 12 districts.
Source: Cultural China