The first railway from Berlin to Potsdam was opened on 22 September 1838. It was the first railway in Prussia and is now one of the oldest railways in Germany still in operation. Its final stop was at the site of the current Potsdam station. From the station, a port track ran to a steam boat landing west of the Long Bridge (Lange Brücke). With the commissioning of the Potsdam Railway bridge over the Havel by the Potsdam-Magdeburg Railway Company (Potsdam-Magdeburger Eisenbahngesellschaft) on 7 August 1846, the former terminus became a through station. The station building was built in the neoclassical style. This and the station forecourt (Bahnhofsvorplatz) now lay north of the tracks. In 1928, it was connected to the Berlin S-Bahn network. The complete electrication of the suburban line lasted nearly a year. In World War II, the station was destroyed and a new station building was built after the war.
From 1953 to 1958, it was connected to East Berlin by S-Bahn Durchläuferzüge ("through running trains"), which did not stop in West Berlin. From 1958, East Germany relocated internal traffic to the developing Berlin outer ring. After the commissioning of the outer ring so-called Sputnik trains ran from the new Potsdam Süd (south) station on the south-western outskirts (now called Potsdam Pirschheide station) via Schönefeld Airport to East Berlin. Long-distance trains on internal routes and later Interzone trains (Aachen–Görlitz and Munich–Rostock) also ran over the outer ring. The station was renamed Potsdam Stadt in 1960 and Potsdam Süd station was renamed Potsdam Hauptbahnhof in 1961. The electric S-Bahn service to Potsdam was disrupted by the construction of the Berlin Wall in 1961 and abandoned a few months later. The Potsdam Stadt and Babelsberg stations could only be reached by local trains from inter alia the old Potsdam Hauptbahnhof. The transit trains (Transitzügen) between West Berlin and West Germany passed through Potsdam Stadt and there were personnel to monitor boarding and disembarking passengers at Potsdam Griebnitzsee. Passengers could not board there until 1963.
In January 1990, local services were re-established to Berlin-Wannsee and full S-Bahn services were re-established in 1992. In 1997, work began on demolishing the old Potsdam Stadt station, including its entrance building, the roundhouse and sidings, and replacing them with new buildings. The design for the new works were produced by the office of Gerkan, Marg and Partners. It consists of two long building complexes that are linked by a connecting structure topped by a wavy roof. The extensions to the platforms were integrated into the connecting structure. The S-Bahn platform was built new and a regional platform was upgraded. At the south entrance, a new station forecourt was built with bus and tram platforms and a bus parking area. A new shopping centre and a cinema was opened under the name of Bahnhofspassagen Potsdam (Potsdam station passages), along with office and commercial areas.
On 1 September 1999, Potsdam Stadt station was renamed as Potsdam Hauptbahnhof. Its DS-100 code is BPD and its station code is 5012.
The construction of the station was highly controversial and was discussed at length. A proposal for a facade with yellow brickwork was rejected and the dimensions of the building give the impression of office complexes, the scale of which—as the critics predicted—would be at odds with the historical city of Potsdam. UNESCO considered whether Potsdam should be added to the List of World Heritage in Danger because of the project. Subsequent changes during construction and the non-commencement of some parts of the construction, however, meant that this could be avoided.