The history of the Warsaw Commuter Railway (WKD) dates back to the early twentieth century. The rail line was launched on 11th December 1927 as the first standard electric railway in Poland under the name of Electric Commuter Railway (Elektryczne Koleje Dojazdowe – EKD). At that time "Power and Light joint-stock company" [pl. Siła i Światło S.A.] with the majority English equity capital was the stockholder. This company was the initiator of the construction, the investor and the stockholder of the EKD. The first train entered the rail line on 11th December 1927. The construction of the rail line started in Komorów and was carried out in both directions , i.e. towards Warsaw and towards Grodzisk Mazowiecki. The original rail line route in Warsaw was different from the existing one. The rail line was led in a certain distance from the track of Warsaw-Vienna Iron Road and via Nowogrodzka Street it was led up to Marszałkowska Street.
During the construction of the rail line the then cutting-edge technology was applied. The rail line was equipped with a modern system of driving trains based on automatic traffic lights brought over from Sweden. It ensured a high level of safety of train traffic and a frequency of trains unattainable on state railways. In addition to traffic lights, another remarkable thing was implemented by means of railcars and trailer cars brought from England that could attain a dizzying (at that time) speed of 70 km/h; they were also equipped with Westinghouse air brakes. A good transport connection to the city centre was to ensure a high number of passengers and relevantly high revenues.
The EKD’s heyday was in the last years before the war, although gradual expansion and modernization works were carried out until 1989. Just before the outbreak of World War II, the entire rail line was used by about 4000 passengers. Until 1947, the entire area of grounds occupied for construction purposes was officially owned by the company, except for the urban segments of the rail line in Warsaw, Milanówek and Grodzisk.
In October 1947, the process of nationalization of the EKD joint stock company was initiated. The acquisition by the “PKP” Polish National Railways was finalized in 1951, assigning the rail line to the District Management of the National Rail [Dyrekcja Okręgowa Kolei Państwowych] and changing the name of Electric Commuter Rail (EKD) into the Warsaw Commuter Railway (WKD). The nationalized WKD company incessantly provided excellent and inexpensive communication. After 1960, due to the rising volume of motor car traffic, the rail lines between Grodzisk Mazowiecki (1966) and Milanówek (1972), and between Włochy and Warsaw (1971) were closed.
In the years 1960-1975 the wooden cantilever constructions of the railway system were changed into metal constructions and the track systems at the stations: Komorów, Podkowa Leśna Główna and Grodzisk Mazowiecki Radońska as well as the traffic lights were rebuilt; a new maintenance and repair facility for the rolling stock and back-office building were erected. In 1963, the WKD rail line along Nowogrodzka and Tarczyńska streets was closed, laying the line in the diametrical line trench nearby the railway station Warszawa Zachodnia. A new station Warszawa Śródmieście WKD was laid, at the level of the diametrical track line at Chałubińskiego street, which to this day is the end station of the WKD line.
In 1972 the old fleet from English manufacturers was replaced with electric train sets series EN94 manufactured in Wroclaw PAFAWAG. In January 1975, for the last time, the route of the rail line in the city of Warsaw was changed, removing it from Szczęśliwicka street and leading it towards the cross-town railway line from "Warszawa Raków" stopover.
In the mid-90s of the 20th century, the “PKP” Polish National Railways resolved to set the WKD apart from the “PKP” Polish National Railways Capital Group. On 1 February 1994, the WKD Rail Line Operator [Zakład Eksploatacji Linii WKD] in Grodzisk Mazowiecki was established. The breakthrough, however, was connected to the decision of the Government of the Republic of Poland on the commercialization of the “PKP” Polish National Railways. Consequently, the assets of the WKD were separated from the assets of the “PKP” Polish National Railways.
On 22 December 2000, Warsaw Commuter Railway Ltd (WKD) was established, with a new management board and budget, which commenced to run its business operations on 1st July 2001. Since then, the company has implemented a number of projects aimed at marking its autonomy, improvement in travel safety and visibility at the stations and stopovers of the WKD.