After the Sino-Japanese War of 1894–1895, Japan took possession of Taiwan from China through the Treaty of Shimonoseki.
In May 1895, Japanese troops began an attack on Taiwan. General Liu Yung-fu fought against the Japanese with volunteer troops led by local gentry such as Chiu Feng-chia, Hsu Hsiang, Wu Tang-hsing, and Chiang Shao-tsu. The Japanese army occupied Taiwan at the cost of over 4,800 deaths and 27,000 injuries. At the end of the year, an uprising erupted in Yilan in northern Taiwan. Afterward, multiple armed uprisings broke out across Taiwan. Three heroes of the resistance, Chien Ta-shih, Ke Tieh-hu, and Lin Shao-mao, led troops in a guerrilla war that lasted for seven years.
In the wake of World War I, Taiwan's national bourgeoisie and intellectuals, including Lin Hsien-tang and Chiang Wei-shui, launched counter-Japanese movements as they struggled with the Japanese colonial authorities to preserve Chinese culture. Historian Lien Heng completed the General History of Taiwan, and Huang Yu-chai completed The Revolutionary History of Taiwan, which recorded the struggle against Japan from 1895 to 1925.
After the Lugou Bridge Incident on July 7, 1937, over 50,000 compatriots of Taiwan overcame all barriers to return to the mainland and join in the war of resistance against Japan, among whom were Chiu Nien-tai, Tsou Hung, Lin Cheng-heng, Lien Chen-tung, and Li Yu-bang. Cultural works supporting the resistance appeared as well, such as Wu Cho-liu's novel The Orphan of Asia, which portrayed the enduring spirit of the Chinese nation, and Ho Fei-kwang's The Light of East Asia, known as "a sword of justice on the silver screen."
On December 9, 1941, the Chinese government issued the Declaration of War against Japan, openly "declaring to the whole world that all treaties and agreements concerning Sino-Japanese relations must be terminated." The Treaty of Shimonoseki was declared invalid. It was also solemnly declared that China would recover "Taiwan, Penghu, and the four provinces of northeast China."
In November 1943, the heads of state of China, the United States, and Great Britain held the Cairo Conference, at which Chiang Kai-shek's demand for the recovery of Taiwan was supported by the other two heads of state.
On July 26, 1945, China, the United States, and Great Britain issued the Potsdam Proclamation, reiterating that "the terms of the Cairo Declaration must be carried out" and Japan must return Taiwan and the Penghu Islands to China.
On August 15, Japan declared its unconditional surrender. On August 28, the National Government appointed Chen Yi as chief executive of Taiwan and commander-in-chief of the Taiwan garrison headquarters.
On the morning of October 25, the surrender acceptance ceremony for the province of Taiwan in the China Theater was held at the Sun Yat-sen Conference Hall in Taipei. Rikichi Andō, the Japanese representative, signed and stamped the instrument of surrender. Taiwan was thus returned to the motherland after having been occupied by Japan for 50 years. To mark the event, October 25 was designated as the recovery day of Taiwan.
(Source: The Chinese War of Resistance Against Japanese Aggression: A Concise History)