In 1895, China ceded Taiwan to Japan after the First Sino-Japanese War. Taiwan thus became Japan's first colony. Many Taiwanese resisted, and anti-Japanese uprisings became common.
In response, the Japanese colonial government built large prisons in Taihoku and Tainan Prefecture to hold political prisoners.
The Taipei prison was based on a radial floor plan, a standard prison design of the 19th century. The prison walls were made with stones from the Old Taipei City Wall, built by the Qing Dynasty at the end of the 19th century. The stones were carved completely by hand from the quartzose sandstone quarries in the Dazhi (大直) and Neihu areas of Taipei.
World War II Allied prisoners
In 1944 and 1945, Allied airmen who had been shot down or crashed while on patrols over Taiwan were held in the Taipei Prison by the Japanese Army. On 29 May 1945, 14 of these allied airmen were given a mock trial and sentenced to death. They were executed in the prison courtyard 58 days before the end of World War II. When the war ended, the rest of the men were released and returned home.