The Haarlemmerpoort (Haarlem Gate)
The current Haarlemmerpoort at the Haarlemmerplein is actually the fifth Amsterdam City Gate in the direction of Haarlem. The earlier gates were part of the previous defense lines of the capital. With every expansion the city gate was moved further West. This fifth gate is the last built Amsterdam city gate, built to celebrate the coronation of King Willem II on 7 October 1840 in the Nieuwe Kerk. Even though this fifth one is officially named Willemspoort, it is still called Haarlemmerpoort by all Amsterdammers.

The 5 consecutive Haarlem Gates (Haarlemmerpoorten) on the map.
Note the pointy shape on the Marnixkade (Eerste Marnixplantsoen), where the 17th century wall bastion stood.
The 1st Haarlemmerpoort (1380-1506)
Around 1340 the most northern point of the city was in the bend of the Nieuwendijk, which was called the Windmolenzijde (Windmill side). Where the Voorburgwal and Achterburgwal (now Spuistraat) merged, a chamber lock (sluiskolk) was constructed which exited into the IJ through the newly dug Martelaarsgracht. On top of the lock and on the dike a new city gate was constructed, the 1st Haarlemmerpoort.
This 1st Haarlemmerpoort was also known as Karthuizerspoort, Nieuwendijkerpoort, Watergangspoort or Windmolenpoort. Build around 1380, it probably stood at the bend of the Nieuwendijk, at the corner of the Haringpakkerssteeg, near Slijterij De Vreng at Nieuwendijk 75 — the exact location is debated, as there are no known images of that gate from that era.

The probable location of the 1st Haarlemmerpoort near the lock on the left. On the right hand side the 2nd Haarlemmerpoort. Detail of a map from 1538 by Cornelis Anthonisz.
In 1450, as the city grew, a new canal was dug and a new (2nd) Haarlemmerpoort was constructed. The old 1st Haarlemmerpoort kept its gate function until 1481 — it was torn down around 1506. The sluice over which the 1st gate had stood, the Spaarndammersluis, was still needed for the city’s water management. The sluice was renewed and is still visible on the map by Cornelis Anthonisz from 1538. It was removed after the Nieuwezijds Voorburgwal was filled in (1883-1884), its function taken over by the Oranjesluizen (near Zeeburg, on the East side of town) in 1872.
The 2nd Haarlemmerpoort (1397-1612)
The 2nd Haarlemmerpoort was a massive stone construction with six towers, built across the water in 1397. It was linked to the Haringpakkerstoren (formerly Heilige Kruistoren) by the stone city wall built after 1480. It had a main gate on the city side, a front gate on the field side and a wooden draw bridge. It was located at the current Martelaarsgracht (water until 1883), and also served as the old Haarlem sluice (Haarlemmersluis), not to be confused with the current Haarlemmersluis on the Korte Prinsengracht.

The 2nd Haarlemmerpoort. On the bottom left is the Haringpakkerstoren (formerly the Heilige Kruistoren).
Detail of a painting by Jan Christiaensz Micker (around 1540).
In 1481 the city started to lay the foundations for a new city wall along the Singel, Nieuwe Doelenstraat, Kloveniersburgwal and Geldersekade. That wall had four main gates, the Sint Anthoniespoort, the Haarlemmerpoort, the Heiligewegspoort and the Regulierspoort. Nothing remains today of neither this 2nd Haarlemmerpoort nor of the Heiligewegspoort.

Attempt by the Beggars to overtake Amsterdam in 1577 at the 2nd Haarlemmerpoort.
On 23 November 1577 a few hundred Beggars (Geuzen), led by commander Helling, entered the city at this 2nd Haarlemmerpoort in a foiled attempt to take the city. They thought they had reached Dam square, when they were actually at the Nieuwezijds Kolk. They occupied the Korenmetershuis (Corn Weigh House), thinking it was the City Hall. By the time they realised their mistake, the city guards had already regrouped on Dam square and drove them out of the city. Geuzen (Beggars) was the name assumed by a confederacy of Calvinist Dutch nobles who from 1566 on opposed the Spanish rule in the Netherlands. Amsterdam, fearing trade consequences, had not initially joined the revolt.
The 3rd Haarlemmerpoort (1593-1612)
With the city’s expansion in 1593, an earthen wall was laid around what is now the Herengracht, with wooden city gates. This 3rd Haarlemmerpoort was located further West, somewhere near the current Herenmarkt. The gate had two draw bridges and a front gate. It was demolished in 1612, so it had a rather short lifespan.

Detail from a map from 1597 by Pieter Bast, with the 3rd Haarlemmerpoort.
The 4th Haarlemmerpoort (1615-1837)
With the third Amsterdam expansion (Derde Uitleg) from 1613-1615, the Haarlemmerdijk and the 3rd Haarlemmerpoort came to be located inside the city walls. The entrance to the city from the Haarlem side was moved to the end of the Haarlemmerdijk near the Singelgracht. The build of the 4th Haarlemmerpoort was started in 1615 and finished in 1618. The gate was designed by architect Hendrik de Keyser, had white sandstone on the city side and a bend inside the gate itself (for defense purposes). By 1837 the gate had become so derelict that the city decided tear it down.

4th Haarlemmerpoort by architect Hendrik de Keyser on an oil painting from 1618.
The road from Amsterdam to Haarlem at that time followed the curved old IJ-dike. From 1632 on a straight road led from this 4th Haarlemmerpoort to the Haarlemmer Trekvaart. The Haarlemmerplein, now inside the city walls, became a square where the carts and carriages from outside the city were parked. On the edges of the square were related businesses, blacksmiths, inns, traders and transporters with their stables.
The 5th Haarlemmerpoort (1840-present)
Three years after the demolition of the 4th Haarlemmerpoort, the fifth Haarlem gate was officially opened on 27 November 1840, with the official name Willemspoort (for King Willem II). From 1849-1866 it served as a municipal tax office, its function as a gate disappeared when the bridge was moved. From 1877-1897 the right hand side was in used as storage by the Amsterdam fire department. In 1889 the city council decided to demolish it, but then decided to keep the gate again in 1900.
From 1900-1961 it was a police post with two jails. After the Second World War it was mostly used as a storage for Stichting Monumentenzorg (Foundation for Monument Preservation). Finally in 1975 the council decided to restore the gate, but that did not happen until 1984. Occupation by squatters put the gate back on the political agenda in 1978. There are now ten apartments inside the gate. Another extensive restoration took place in 2018, and now the gate seems to have finally earned a place as a lasting landmark in the neighbourhood.

The 5th Haarlemmerpoort in 1845.

View through the 5th Haarlemmerpoort in 2020, seen towards the city and the end of the Haarlemmerdijk.
If you see this after your page is loaded completely, leafletJS files are missing.