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 from Temiya in Otaru through Sapporo to Horonai in Mikasa, built to carry coal from the coalmines near Iwamizawa to the port of Otaru; Temiya and Horonai stations have both since closed. 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 railway reached Asahikawa on 16 July 1898, when the Kamikawa Line opened.
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 section from Hakodate opened on 10 December 1902; the line was extended further in 1903, and by 1904 it was complete between Hakodate and Otaru. On 1 August 1905 the company opened a short link from its Takashima terminus (today's Otaru Station) to the Hokkaido Colliery and Railway Company's Otaru station (today's Minami-Otaru), completing a through route between Hakodate and Asahikawa. Both companies were then nationalised under the Railway Nationalization Act: the Hokkaido Colliery and Railway Company's line on 1 October 1906, and the first Hokkaido Railway Company's Hakodate to Otaru section 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 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, the day the branch opened between Mori and Oshima-Sawara, and the whole branch from Onuma to Mori was 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 air routes expanded and the parallel Muroran and Chitose lines were upgraded, the Oshamambe to Sapporo mountain route lost its long-distance limited-express traffic; by the end of October 1986 all regular 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 the Kamui, Lilac, Soya and Okhotsk limited expresses, with frequent local and rapid trains in the Sapporo area between Otaru and Iwamizawa, among them the Airport rapids between Otaru and Sapporo.
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 the largest derailment in the history of Japanese National Railways, on 2 October 1976 between Komagatake and Himekawa, when 40 of a freight train's 41 wagons and a diesel locomotive overturned. 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.
Stations on this line
84 stations tracked on the map, listed alphabetically. Select any to read its page.
- Akaigawa赤井川
- Asahikawa旭川
- Asari (Hokkaido)朝里
- Atsubetsu厚別
- Bibai美唄
- Chashinai茶志内
- Chikabumi近文
- Ebeotsu江部乙
- Ebetsu江別
- Fukagawa深川
- Futamata (Hokkaido)二股
- Ginzan銀山
- Goryokaku五稜郭
- Hakodate函館
- Hassamu発寒
- Hassamu-Chuo発寒中央
- Higashi-Mori東森
- Hirafu比羅夫
- Horomui幌向
- Hoshimiほしみ
- Hoshioki星置
- Inaho稲穂
- Inazumi-Koen稲積公園
- Ishikura石倉
- Iwamizawa岩見沢
- Kakarima掛澗
- Kami-Horomui上幌向
- Kikyo桔梗
- Komagatake駒ヶ岳
- Konbu昆布
- Koshunai光珠内
- Kotoni (JR Hokkaido)琴似
- Kozawa小沢
- Kunnui国縫
- Kuroiwa黒岩
- Kuromatsunai黒松内
- Kutchan倶知安
- Mena目名
- Minami-Otaru南小樽
- Minenobu峰延
- Mori (Hokkaido)森
- Moseushi妹背牛
- Naebo苗穂
- Naie奈井江
- Nanae七飯
- Neppu熱郛
- Niki仁木
- Nisekoニセコ
- Niyama仁山
- Nodaoi野田生
- Nopporo野幌
- Oasa大麻
- Onakayama大中山
- Onuma大沼
- Onuma-Koen大沼公園
- Osamunai納内
- Oshamambe長万部
- Oshima-Mumajiri渡島沼尻
- Oshima-Sawara渡島砂原
- Oshironai尾白内
- Otaru小樽
- Otaru-Chikko小樽築港
- Otoshibe落部
- Rankoshi蘭越
- Ranshima蘭島
- Sapporo (JR Hokkaido)札幌
- Shikabe鹿部
- Shikaribetsu然別
- Shin-Hakodate-Hokuto新函館北斗
- Shinrin-Koen (Hokkaido)森林公園
- Shioya (Hokkaido)塩谷
- Shiroishi (Hokkaido · JR Hokkaido)白石
- Soen桑園
- Sunagawa砂川
- Takasago (Hokkaido)高砂
- Takikawa滝川
- Teine手稲
- Toyohoro豊幌
- Toyonuma豊沼
- Yakumo八雲
- Yamakoshi山越
- Yamasaki山崎
- Yoichi余市
- Zenibako銭函
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 Kamikawa Line opens to Asahikawa.
- 190210 December: the (first) Hokkaido Railway Company opens its first section from Hakodate.
- 19051 August: the Takashima-Otaru section opens, completing a through route between Hakodate and Asahikawa.
- 19061 October: the Hokkaido Colliery and Railway Company's line 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 between Mori and Sawara is nationalised and the branch opens between Mori and Oshima-Sawara; the whole Sawara branch from Onuma 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 its 41 wagons and a locomotive overturn in the largest derailment in JNR history.
- 1986October: the last regular limited-express and express trains run on the Oshamambe-Sapporo section; the 1 November timetable revision withdraws them 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
- Wikipedia (English)
- Wikipedia (日本語)
- Wikidata (Q1151119)
- 北海道の鉄道、各線区の成り立ち | ほっかいどう晴レールプロジェクト (北海道鉄道活性化協議会)
- 旭川市のあゆみ (旭川市)
Last updated 16 October 2026.
Gallery 4 photos
Every photo for this page. Tap any image to view it full-size. All from Wikimedia Commons (credit under each).