Placer (alluvial) gold was discovered near the end of the 1880s in Keelung River (基隆河) sediment near Nuan Nuan (暖暖), at the eastern terminus of sampan routes traversing the Taipei Basin. One account attributes the discovery to a Cantonese member of a railway construction crew who had previously panned for gold in California and saw something enticingly familiar glinting in mud scooped from the river. The find sparked a gold rush that for several heady years saw the Keelung River bank done over in a motley hodgepodge of prospector tents and shanties.
While many came to work the riverbed, others prospected in the wilderness upstream, hoping to reach the font of Keelung's golden sands. Strikes were first made around the source of the Keelung River in the rugged hills around Jiufen, a settlement overlooking the sea once so remote and sparsely populated that its name (九份 - literally "Nine Portions") was conferred by merchants sailing the coast to designate the number of provision bundles they could expect to sell there. In 1893, less than two years before Japan took control of the island, a large strike was made beyond Jiufen, in the hills below Teapot Peak (茶壺山). Prospectors flooded in and, taking note of the unusual shape of a rocky outcropping, named the district Jin-gua-shih (金瓜石, "Pumpkin Rock").
By the 1890s, rights to mine beneath Jiufen had been licensed to several families, who divvied up and further subleased their holdings to the flood of hopeful prospectors. As a result, dozens (perhaps hundreds?) of small shafts were dug and worked in and around the town. Jiufen, like all mining towns, enjoyed its raucous boom days and, once the gold gave out, slid into melancholy bust.
The town was ready to crumble into obscurity when film director Hou Hsiao-hsien (侯孝賢) chose Jiufen's steep alleyways and fading façades as the backdrop for his 1989 film City of Sadness (悲情城市, see movie trailer here). Its place in Taiwan's history thus confirmed, Jiufen joined the pantheon of Taiwan's modern historical landmarks and is today a congested weekend tourist trap chock full of eateries, teahouses and souvenir shops.
The newer and richer mines at Jinguashi followed a somewhat different fate. After 1895, Japan consolidated and then nationalized mining operations at Kinkaseki (the Japanese pronunciation of Jinguashi). Mountains of earth were, literally, "moved" and the land was torn apart to reach and follow subterranean mineral veins. Copper was discovered in 1933 and, by the 1940s, Kinkaseki was producing more copper than any other mine in the Japanese Empire.
Nearly 600 British and Commonwealth soldiers taken prisoner during the 1942 fall of Malaysia and Singapore were shipped to Kinkaseki and interned at the most infamous of Japan's 15 POW camps on Taiwan. The more than 1,100 prisoners held at the Kinkaseki camp between 1942 and 1945 worked as slave labor in the mines and endured the harshest of conditions. Cave-ins, injury, disease, malnutrition and executions made Kinkaseki one of the worst of Japan's POW camps. Fewer than 100 of the Allied prisoners held at Kinkaseki are believed to have survived to war's end.
With the end of the Second World War, Jinguashi mines reopened under ROC government management. However, increasing tunnel depths and engineering difficulties gradually made the mine uneconomical ... and operations shut down for good in 1971.