The first railway in Nepal opened in 1927 from Raxaul (India) to Amlekhganj, a distance of about 48km (46km in Nepal). It was built to 2ft 6in (762 mm) gauge. The line closed in 1965. Part of the route was subsequently used for a 6km broad gauge (5ft 6in, 1675 mm) branch line from Raxaul to the Inland Container Depot at Sirsiya, near Birgunj. The new line opened in 2005 and is used exclusively by freight trains.
The original line was joined in 1937 by a separate 2ft 6in (762 mm) gauge line, running for about 53km (50km in Nepal) from Bijalpura via Janakpur to Jaynagar (India), where there was interchange with a line of the Indian Railways network. The section from Bijalpura to Janakpur closed in 2001 following a bridge collapse. The remaining 29km of the line from Janakpur to Jaynagar continued in operation, albeit rather erratically, for local passenger traffic with some freight until 2014, when it was closed for conversion to broad gauge. It reopened in 2018. Extension to the original terminus of Bijalpura is planned.
Around 2010, proposals emerged for several major new railways. A 945km electrified line is planned to run the length of the country from Kakarvhitta in the east to Bhim Datta in the west, continuing to the Indian border at Gaddachowki. Construction of the first 5km section near Simara commenced in 2014. A number of smaller projects totalling some 180km are proposed, mainly concerning cross-border connections with India. A feasibility study for a metro system in the capital, Kathmandu, was initiated in 2012.
In 2018, a Memorandum of Understanding was signed with China for the construction of a new railway which would link Kathmandu with China via a border crossing at Rasuwa Gadhi, connecting with the existing Chinese network at Xigazê in Tibet. It would be built to standard (1435mm) gauge; about 72km of the line would be in Nepal. Extensions from Kathmanu to Pokhara and Lumbini are envisaged.