History
The line's origins lie in the earliest railway building on the island. Between 1880 and 1882 the government-run Horonai Railway opened the line linking Temiya (in Otaru) and Sapporo with Horonai (in Mikasa), built to carry coal from the coalmines near Iwamizawa to the port of Otaru. The Sapporo to Iwamizawa section opened in 1882. In 1889 the Horonai Railway's lines were transferred to the private Hokkaido Colliery and Railway Company, which extended the line from Iwamizawa to Sunagawa in 1891. The government's Hokkaido Government Railways then built the Kamikawa Line onward from Sorachibuto to Asahikawa, opening on 16 July 1898.
The Hakodate end was built separately by the (first) Hokkaido Railway Company, a private company distinct from the later second company of the same name that built the Chitose Line. Its first sections, from Hakodate toward Hongo and from Shikaribetsu to Ranshima, opened on 10 December 1902, with extensions through 1903 and 1904. On 1 August 1905 the Takashima to Otaru section opened, completing a through route between Hakodate and Asahikawa. The private operators were progressively nationalised: the Hokkaido Government Railways was absorbed into the state Railway Operations Bureau in 1905; the Hokkaido Colliery and Railway Company's Otaru to Sorachibuto section was nationalised on 1 October 1906 under the Railway Nationalization Act; and the first Hokkaido Railway Company's Hakodate to Otaru section was nationalised on 1 July 1907. On 12 October 1909, under the state railway's line-naming scheme, the Hakodate-to-Asahikawa route was formally designated the Hakodate Main Line.
Over the following decades the line was progressively double-tracked in stages, with bypasses and realignments added to ease its steep grades. The Onuma to Oshima-Sawara to Mori section (the Sawara branch) was built during the Second World War as a bypass around the steep Komagatake routing to increase capacity; the Watarishima Coast Railway between Mori and Sawara was bought out and nationalised on 25 January 1945 and incorporated into the Hakodate Main Line, with the branch through to Mori completed on 1 June 1945. Electrification came in the postwar era: the Otaru to Takikawa section was electrified at 20,000 V 50 Hz AC on 28 August 1968, and Takikawa to Asahikawa followed on 1 October 1969. The short Hakodate to Goryokaku section was electrified on 13 March 1988 in conjunction with the opening of the Kaikyo Line through the Seikan Tunnel.
As high-speed road and air competition grew and the parallel Muroran and Chitose lines were upgraded, the Oshamambe to Sapporo mountain route lost its long-distance limited-express traffic; by October 1986 all limited-express and express services between Oshamambe and Sapporo had been withdrawn in favour of the coastal route. Today no single train runs the full Hakodate to Asahikawa length; the line operates as a series of distinct segments. The Hakodate to Oshamambe section carries the Hokuto limited express and, since 2016, the Hakodate Liner connecting service; the Otaru to Sapporo to Asahikawa segment is an electrified main artery carrying frequent local and rapid trains (including the Airport rapids) and the Kamui, Lilac, Soya and Okhotsk limited expresses.
On 1 April 1987, with the privatisation of Japanese National Railways, JR Hokkaido took over the whole line as a Class-1 railway operator, and JR Freight became a Class-2 operator over the freight sections. On 26 March 2016, when the Hokkaido Shinkansen opened between Shin-Aomori and Shin-Hakodate-Hokuto, Oshima-Ono Station was renamed Shin-Hakodate-Hokuto and the Goryokaku to Shin-Hakodate-Hokuto section was electrified; the Hokkaido Shinkansen route north of Shin-Hakodate-Hokuto approximately parallels the Hakodate Main Line. Ahead of the Shinkansen's planned extension to Sapporo, the future of the line's southern segments has been decided in part: on 27 March 2022 the prefecture and lineside municipalities agreed to close the Oshamambe to Otaru section after that extension opens and convert it to bus routes, while the Hakodate to Oshamambe section is the subject of separate discussions because it remains a major freight artery between Hokkaido and Honshu.
Notable incidents include a major derailment on 2 October 1976 between Komagatake and Himekawa, in which 40 of a freight train's 41 wagons plus a diesel locomotive overturned; the Japanese source describes it as the largest derailment in Japanese National Railways history. In August 2013 a freight train derailed near Yakumo after striking a piece of wood obstructing the track, temporarily closing the line with no injuries; the following month a freight train derailed at Onuma Station, an incident in which falsification of track-inspection data later came to light.
Timeline
- 188028 November: the government-run Horonai Railway provisionally opens the Temiya-Kaiuncho-Sapporo section, the first railway in Hokkaido.
- 188213 November: the Sapporo-Iwamizawa extension opens, completing the Horonai Railway's Temiya-Horonai line, built to carry coal to Otaru port.
- 188911 December: the Horonai Railway's lines are transferred to the private Hokkaido Colliery and Railway Company.
- 18915 July: the Hokkaido Colliery and Railway Company extends the line from Iwamizawa to Sunagawa.
- 189816 July: the Hokkaido Government Railways' Kamikawa Line opens from Sorachibuto to Asahikawa.
- 190210 December: the (first) Hokkaido Railway Company opens its first Hakodate-side sections (Hakodate-Hongo; Shikaribetsu-Ranshima).
- 19051 August: the Takashima-Otaru section opens, completing a through route between Hakodate and Asahikawa.
- 19061 October: the Hokkaido Colliery and Railway Company's Otaru-Sorachibuto section is nationalised under the Railway Nationalization Act.
- 19071 July: the first Hokkaido Railway Company's Hakodate-Otaru section is nationalised.
- 190912 October: under the state railway line-naming scheme, the Hakodate-Asahikawa route is formally named the Hakodate Main Line.
- 194525 January: the Watarishima Coast Railway (Mori-Sawara) is nationalised and incorporated as the Sawara branch; the branch through to Mori is completed on 1 June.
- 196828 August: the Otaru-Takikawa section is electrified at 20,000 V 50 Hz AC.
- 19691 October: the Takikawa-Asahikawa section is electrified.
- 19762 October: a freight train derails between Komagatake and Himekawa; 40 of 41 wagons and a locomotive overturn, described by the JA source as the largest derailment in JNR history.
- 1986October: all limited-express/express services on the Oshamambe-Sapporo section are withdrawn in favour of the coastal route.
- 19871 April: JNR is privatised; JR Hokkaido takes over the whole line as Class-1 operator and JR Freight becomes Class-2 operator on freight sections.
- 198813 March: the Hakodate-Goryokaku section is electrified in conjunction with the opening of the Kaikyo Line (Seikan Tunnel).
- 2013August: a freight train derails near Yakumo after striking wood on the track (no injuries). September: a freight train derails at Onuma Station, exposing falsification of track-inspection data.
- 201626 March: with the Hokkaido Shinkansen opening to Shin-Hakodate-Hokuto, Oshima-Ono is renamed Shin-Hakodate-Hokuto, the Goryokaku-Shin-Hakodate-Hokuto section is electrified, and the Hakodate Liner is introduced.
- 202227 March: the prefecture and lineside municipalities agree to close the Oshamambe-Otaru section after the Hokkaido Shinkansen extension to Sapporo and convert it to bus routes.
Sources
Facts last verified 3 June 2026.
Gallery 4 photos
Every photo for this page — tap any image to view it full-size. All from Wikimedia Commons (credit under each).