This painting (right) depicts the battle of 旅順, a major harbor city coveted also by Russia, Germany, and France. These three nations had objected to and ultimately denied the Japanese demand for the Liaotung Peninsula in the Shimonoseki Peace Treaty (detailed below). 旅順, however, eventually became a battle ground in the Russo-Japanese war of 1904-5.
The Japanese Navy [blue arrows in the map above], in coordination with the Army, had launched from Nagasaki and sailed steadily north along the west coast of Korea. In July, 1894, it dueled with the Qing Navy in the 豐島 Sea. And in the Battle of the Yellow Sea (Sep, 1894) had annihilated the Qing 北洋Beiyang Fleet. In this diagram on the left, the Japanese battleships are shown in black. Togo Heihachiro commanded the 浪速Naniwa. He had come to observe the Battle of Fisherman's Wharf in 1884.
The commander-in-chief of the Qing Fleet, the British-trained Admiral 丁汝昌Ting Lu-Chang was on board his flagship, the Battleship 定遠TingYuan. Both Ting and the ship were wounded. Unfortunately, Adm Ting did not designate a second-in-command and the chain of command was lost. With the fleet now in poor formation, the ships became easy targets for the faster and more powerful Japanese fleet. All together, 5 Qing warships were sunk. After the loss at the Battle of the Yellow Sea, the Qing fleet regrouped to defend 威海衛. This mission had also failed. And on Feb 11, 1895, Adm Ting committed suicide refusing to yield to the Japanese. The Qing Court did not honor his death citing dereliction of duty. It actually disallowed a proper burial for Adm Ting until 1910 when he was somehow exonerated for losing both the battle and the fleet.
As a footnote, the 定遠, built in Germany and commissioned in 1883 but delivered only after the Sino-French War, was a steel-hulked warship (see picture below). At 7,220 tons with 22 guns (4 of them Krupps at 305-mm), it was one of the most formidable battleships of the Qing Navy. It evoked a sense of doom among the Japanese during an 1886 port call to Japan. It, as other warships in the Qing fleet, had fallen into disrepair owing to the misappropriation of funds by the Qing Royal Court. By 1894, it was no longer an adequately armed warship. 定遠's sister ship, the 鎮遠ZhenYuan was captured near 威海衛 by the Japanese and conscripted into 17 years of service before being scrapped and sold in 1912. Some remaining parts were returned to China in 1947.
To end the war, a peace treaty must be agreed upon by both sides. On March 23, 1895, Japan attacked the Pescadores Islands [with Togo Heihachiro playing a crucial role] to put pressure on the negotiation. The meetings took place in a restaurant 春帆楼 in下関, also known as 馬關, in 山口Yamaguchi Prefecture. And the first part of the treaty reads as follows:
Essentially, the Shimonoseki Treaty下関条約 [or 馬關條約 in Chinese] stipulates:
1. 清朝の朝鮮に対する「宗主権」放棄（朝鮮独立の承認）[that the Qing Court recognize the independence of Korea]
2. 遼東半島・台湾・澎湖諸島の割譲 [that Liaotung Peninsula, Taiwan and the Pescadores be ceded to Japan]
3. 庫平銀(賠償金), 2億両(テール, 約3億円)の支払 [that Japan be compensated for 200 million silver taels or about 300 million Japanese Yen]
4. 新通商条約の締結と最恵国待遇条款 [that Japan be granted the most favored status in a new commercial trade treaty]
5. 沙市・重慶・蘇州・杭州の開市・開港 [that several named ports be opened for trade]
6. 条約履行の担保として山東半島の威海衛の一時占領 [that the port city 威海衛 be temporarily occupied by Japan to guarantee the execution of the peace treaty]
So, there it was, in Article 2: Taiwan and PengHu would henceforth become part of Japan.
The reaction in Taiwan? To put it mildly, it was one of disbelief with an overwhelming sense of betrayal. On May 29, 1895, Japanese forces landed in northern Taiwan ready for the occupation. They ran into fierce Taiwanese resistance which was to last for 5 months until all major cities were lost. It was not until 50 years later, in 1945, when another war nullified the treaty.