The first railway line on Romania's present-day territory was opened on 20 August 1854 and ran between Oravița in Banat and Baziaș, a port on the Danube. The line, which had a length of 62.5 km, was used solely for the transportation of coal. From 12 January 1855, the line was operated by Imperial Royal Privileged Austrian State Railway Company, the Banat province being at that time part of the Austrian Empire.
In September 1866, the Romanian Parliament voted for the construction of a 915 km railway, from Vârciorova in the south to Roman in the north, via Pitești, Bucharest, Buzău, Brăila, Galați and Tecuci, all important population centres. The price for the construction was at that time 270,000 gold francs per kilometre and was contracted to the German Strousberg consortium. The line was opened in various stages, the first stage (Pitești–Bucharest–Galați–Roman) being opened to traffic on 13 September 1872, while the Vârciorova–Pitești segment was opened some time later, on 9 May 1878. The Vârciorova-Roman line was an important part of Romania's rail infrastructure because it spanned the entire Kingdom and provided an important connection for passengers and freight between several significant Wallachian and Moldavian cities.
Gara de Nord (North Station) was finalised. On January 1880, the Romanian Parliament voted to transfer the ownership of the Vârciorova-Roman line from the private administration of the Strousberg consortium to state ownership, under the administration of CFR. 1880 therefore marks the start of the Căile Ferate Române institution which survives to this date. The first administration of CFR was made up of Lords Kalinderu, Stătescu and Falcoianu.
On May 1868, the Romanian state concluded an agreement with another German consortium, known as the "Offenheim Consortium", for the construction of several shorter railways in the region of Moldavia. The lines, which had a total length of 224 km, would run from Roman to Ițcani, from Pașcani to Iași and from Verești to Botoșani. In 1870, the Iași railway station was inaugurated and the lines were progressively opened from December 1869 to November 1871. Due to the poor management of the lines by the Offenheim Consortium, they were placed under the management of CFR in January 1889.
Meanwhile, during the Romanian War of Independence in 1877, Romania annexed the region of Dobrogea, which had previously belonged to the Ottoman Empire. The Romanian state placed under the management of CFR the Constanța–Cernavodă line, which had been opened during the Ottoman times in 1860. The Bucharest-Giurgiu line, the first line constructed in the Kingdom of Romania, was also placed under the administration of CFR during this time.Hence, by 1889, the Romanian state became the owner of all of the lines in the Kingdom of Romania, the railway system having a total length of 1,377 km.
In 1918, the historical regions of Transylvania, Banat, Bassarabia and Bucovina united with the Kingdom of Romania to form Greater Romania. As a result, all railway lines in these regions, previously under the ownership of Austria-Hungary or the Russian Empire, were placed under the administration of CFR.
This event was significant for Romanian railways because it meant that the large Arad rolling stock and steel factory, previously located on Austro-Hungarian territory, was now part of Romania, and was consequently used to produce a wide range of rolling stock and locomotives for CFR.
During this time, various railways were "doubled"— that is, double tracks were introduced on routes to permit a greater flow of traffic. The first line to be doubled was the Bucharest–Ploiești–Câmpina line, where doubling was completed in 1912. In the period between the wars, various other lines were doubled, including:
- Constanța–Cernavodă (1931)
- Adjud–Tecuci (1933)
- Teiuş–Apahida (1940)
- Câmpina–Brașov (1941)
- Buzău–Mărășești (1942)
During the 1920s and 1930s CFR also bought several new locomotives and cars, embarking on a plan of widespread modernisation. Diesel traction was introduced, and the Malaxa high-speed DMUs (a modernised version of which are still in use as commuter trains in Banat) were built.
A significant event in the history of the railways was the Grivița Strike of 1933, which occurred during the Great Depression and resulted in violent clashes between railway workers and police.
After Romania became a Communist republic in 1947, there was quite a significant amount of investment in railway infrastructure, often to the detriment of other forms of infrastructure. During this period, railways were seen as the symbol of Romania's rapid industrialisation under Communist leaders Gheorghe Gheorghiu-Dej and later by Nicolae Ceaușescu. Aside from an increase in train traffic and the construction of various new lines, especially in rural areas, the bulk of electrification and line doubling occurred during the Communist period. Also, railways in Southern Dobruja was left to Bulgaria in 1940 and ones in Northern Bucovina and Bassarabia were to the Soviet Union in 1947.
Various lines were also supplemented with double tracks to permit a wider flow of traffic, including:
- Făurei–Galaţi (1971)
- Pantelimon–Cernavodă (1971)
- Bucharest–Roșiori–Craiova (1972)
- Chitila–Golești[disambiguation needed] (1972)
- Brașov–Câmpul Libertății (1974)
- Adjud–Suceava (1975)
By the mid-1970s, steam traction disappeared completely out of mainstream use, being replaced by standardised diesel and electric locomotives and cars, most of which were built in Romania, at the Astra factory in Arad.