The municipality of Piraeus was founded in 1835 and became one of the municipalities into which Attica was initially divided. The first borders of the municipality remained the same for almost a century.
In 1925, the settlement of New Faliro was detached for the municipality and became the centre of the county of New Faliro.
In 1931, the settlement of Koutsikari was detached from the municipality of Athens and integrated into the municipality of Piraeus. The following years several settlements were detached from the municipality of Piraeus and new municipalities were formed.
In 1933, the settlement of New Kokkinia was detached and became the centre of the municipality of New Kokkinia (later known as Municipality of Nikaia). During the same year Perama was also detached and became the centre of the county of Perama. The settlement of New Ikonio was integrated into the same county. The following year the settlement of Koutsikari was detached and became the centre of the county of Koridallos and the settlement of Tabouria was also detached becoming the centre of the newly developed municipality of Tabouria. In the same municipality the settlements of Amfiali, Analipsi and Agios Georgios were also integrated.
In 1950, the settlement of Drapetsona was detached and became the centre of the county of Drapetsona.
In 1968, New Faliro was integrated once more in the municipality of Piraeus and the municipality of New Faliro was abolished. .
During the following years the municipality of Pireaus remained untouched and stayed this way even after the application of the Kallikakratis Plan in 2010.