From the beginning of the Second Sino-Japanese War in 1937, the railway into Yunnan served as a channel for arms shipments to the Chinese Kuomintang.
French refusal to halt shipments of arms and other war-related goods to China through Tonkin eventually provoked the Invasion of French Indochina by Japanese forces in 1940.

The French government approved the construction of the entire Yunnan line and several sections of the North–South line, approving a loan of 200 million francs within the following year.
Work began swiftly thereafter, with the Phu Lang Thuong—Lạng Sơn line being upgraded and extended from Hanoi to the Chinese border at Dong Dang.
Construction of the first regional rail project, linking Saigon and Mỹ Tho, began in the same year, to be completed soon afterwards in 1885.
The Saigon–Mỹ Tho line reduced travel time between the two cities from 12 hours to only 3 hours, Railway construction multiplied during the administration of Paul Doumer as Governor-General of French Indochina from 1897 to 1902.
The Japanese used the railway system extensively during their occupation, inviting sabotage by the Viet Minh as well as airborne Allied bombing raids.
The railways sustained considerable damage, including the destruction of bridges.It was during this time that construction of the Yunnan–Vietnam and North–South railways began.Construction of the North-South line took over thirty years, finally beginning operation in 1936, during which time other branch lines were also completed.Finally, in 1910, the line was extended to its final destination of Kunming.Construction of the Yunnan line was an extremely difficult undertaking, incurring not only great expenditures but also a great loss of human life.With increased economic growth brought on by the Doi Moi reforms of the late 1980s, the railway system has entered a renewed phase of development.