The first railway line in Russia was built in 1837. It was 17 miles (27 kilometres) long and connected St Petersburg with Tsarskoye Selo (Tsar's Village) – the summer residence of the Imperial family. The tracks reached Moscow only in 1851. In the meantime, in the territory of Poland under Russian rule, upon the joint initiative of Count Henryk Łubieński – the vice-president of the Bank of Poland, and Peter Steinkeller – a banker and industrialist, the concept of constructing the Warsaw-Vienna Railway emerged. The project prepared by the engineer Wysocki provided for the construction of a railway line from Warsaw through Grodzisk, Skierniewice, Piotrków, Radomsko, Częstochowa, Żarki to Niwka in the simplest possible way, avoiding the construction of civil engineering structures. The Warsaw-Vienna Railroad Company Ltd incor-porated in 1838 commenced the construc-tion but due to technical alteration in the project the preliminary cost estimate was consi-derably exceeded. This led to the company's bankruptcy in 1842, litigation and, as a result, the bankruptcy of Peter Steinkeller.
After two years works were resumed under state administration. Rails were imported by sea from England to Gdańsk and then transported to Warsaw by the Vistula. On 14 June 1845, a railway service was inaugurated on the section from Warsaw to Grodzisk, following a parade of all 10 steam locomotives decorated with flowers. The first train was composed of 15 carriages with 200 passengers and a military band on board. The next train, with 24 carriages and more than 600 guests, reached the celebratory picnic in Grodzisk one hour later. In 1848 the line was connected with Austrian railways in Maczki and thus the journey from Warsaw to Vienna took 37 hours. After a few years, in 1857, the Warsaw-Vienna Railway was leased to a company with Prussian capital which built a branch line from Ząbkowice to Sosnowiec.
Companies with Polish capital were very active in building railway lines within the territory under Russian rule. In 1862, the newly established Warsaw-Bydgoszcz Railroad Company built a line between Łowicz and Aleksandrów Kujawski. In 1866 the Łódź-Fabryczna Railroad Company put a passenger connection into service between Łódź and Koluszki for the needs of the weaving industry in Łódź. It was the most profitable railway in the Kingdom of Poland. It was used to transport coal, firewood, machines, beetroots, textiles, lime, sugar, bricks and roofing tiles, yarn, flour and exotic fruits. In the same year the Warsaw-Terespol Railroad Company opened a section of the line to Łuków, one year later to Terespol, to reach Brest in 1871.
The Vistula River Railroad put the Mława – Warsaw – Kovel connection into service (1877) with a branch from Dęblin to Łuków (1876) and a by-pass line in Warsaw with a bridge over the Vistula connecting all railways reaching the capital city of Congress Poland. The Ivangorod-Dąbrowa Railroad Company operated the line from Dęblin (Ivangorod) to Gołonóg in Dąbrowa Basin, with branch lines from Skarżysko to Koluszki and Ostrowiec (1885), and of the connections with the Warsaw-Vienna Railroad within the Basin (1886 and 1887). In 1903 the Warsaw-Vienna Railroad Company, the oldest railroad company in the territory under Russian rule, built the section of the line to Kalisz.
Apart from lines built for economic reasons, the Tsar's authorities also completed a number of strategic connections such as: Siedlce – Małkinia (1887), Brest – Chełm (1887), the Narew River line Łapy – Ostrołęka – Małkinia (1893), Ostrołęka – Tłuszcz – Pilawa (1897), and Łuków – Lublin (1893). Also, transit routes were constructed: Warsaw – Turmantas (Daugavpils), completed by the Main Russian Railroad Company (1862), Brest – Stowbtsy (1871), forming a part of the Moscow-Brest Railroad and Vilnius – Oleknoviche (1872), as part of the Libava-Romny Railroad.
Other railroads included: the Brest-Grajewo Railroad, Brest-Kiev Railroad (Brest – Mohylany section in 1873 and Zdolbuniv – Radziwiłłów section in 1874). In 1890 the Warsaw –Sochaczew – Łowicz – Łódź – Kalisz – Szczypiorno/Skalmierzyce line was put into operation.
Several railway lines departed from Warsaw: the normal-gauge Warsaw-Vienna Railroad departed from the Vienna Railway Station and the broad-gauge railways from the: Brest Railway Station (now Dworzec Wschodni), Petersburg Railway Station (now Dworzec Wileński) and Kovel Railway Station (now Dworzec Gdański). In 1876 various railway stations were connected by a ring rail line with two different track gauges, crossing the bridge over the Vistula near the Warsaw Citadel. In addition, narrow-gauge commuter railway lines were built from: Wilanów (1892), Grójec (1898), Jabłonna (1900) and Marki (1907). The last investment before World War I was the Herby – Częstochowa – Kielce line (1911).
Different types of rails were used to build tracks, e.g. the “Vienna” tracks were laid using three rail types: Stephenson iron rails – 4.57-metre long and Vignoles steel rails – 5.49-metre and 3.66-metre long. At the end of the 19th century in the territory under Russian rule approximately 249 miles (400 kilometres) of lines were laid in a year. Building railway networks was avoided at the borders with the neighbouring countries in order not to facilitate transport to the enemy in the event of war. Stations were located outside cities to help keep military transport secret and aid the inspection of travellers.
Interestingly, railway financing concepts were similar in all three areas under rule. Initially, the state granted railway construction licences to privately-owned companies, with guaranteed “per mile” income, and later the ready lines were nationalised.