Construction of the first railway in the part of French West Africa that would become present day Mali commenced in the 1880s. The line started in Kayes, and was planned to run to Bamako. Work proceeded erratically; at one point it was even proposed that the entire project should be converted from conventional railway to a monorail of the Lartigue type, which at the time of its proposal had not been tried beyond the experimental stage and only ever saw commercial service a few years later on a short (9¼ mile, 15km) line in a remote rural area of southern Ireland (Listowel & Ballybunion Railway). In the event, it was a conventional metre gauge railway, 596km in length, that reached Bamako from Kayes in 1904. In the same year, a 60 km extension was opened from Bamako to Koulikoro, bypassing an unnavigable stretch of the river Niger.
In 1924, a line was opened from Kayes to Dakar on the Atlantic coast, giving an easier outlet to the sea.
After Senegal and Mali gained their independence in 1960, the Dakar to Kayes line became an international line. About 45km of this line lies within Mali. The respective governments each took control of the railways in their own territory, with arrangements put in place for he continuance of international traffic.
In 2003, the two governments handed over control of the entire line to a private consortium, Transrail. Little investment was put into the line and it remained in poor condition. Services were erratic, and sometimes suspended for long periods. The concession was withdrawn in 2016 and all railway services in Mali had ceased by 2018.
Several new railway projects have been proposed but none have as yet been progressed. These include a new 900km railway from Bamako to Conakry in Guinea; and a new 1000km railway from Bamako to the port of San-Pédro in Côte d’Ivoire.