The first written mention of Sládkovičovo (until 1947 Diószeg) can be found in the documents from Béla IV of Hungary in 1252. The name of the village is said to originate from a “walnut forest“ found here. In 1301 the village chief was Milóš Dudvágy and his family, whose ancestors had been working and living here for a long time. In 1337 Péter Orros became the new village chief, appointed by Louis I of Hungary.
In 1530 the village and its surroundings were destroyed by the Ottoman Empire. 22 inhabited houses were here in 1553 which belonged to the Poor Clares of Buda, until the dissolving of their order by Joseph II. The village belonged to the Church afterwards, until it was bought by the Erdődy family and then by the Esterházy’s.
The village became a town in 1582 and in the 17th century the Royal Highway (Via regia) crossed Diószeg. The town had the rights to organise a fair and collect toll. There were two important buildings during this time, the manor and the church.
During the uprising of Francis II Rákoczi the village was strengthened by the czar’s duke Quido Stahremberg, but he couldn’t prevent the village from burning down in 1709.
Joseph II populated the village with German farmers and artisans in 1786. Later two separate villages were created: German and Hungarian Diószeg (Németh Diószeg and Magyar Diószeg). After the Eszterházy family, the Zichy’s became the owners.
The railway which connected Bratislava to Budapest was built stretching through Diószeg in 1850, which led to a huge industrial growth in the region.
In 1867 the sugar refinery, built by the Jewish family Kuffner and the Austrian banker brothers Gutmann, started production. The sugar refinery and the kuffner industrial complex built by the baron Karl Kuffner de Diószeg changed the reputation of the village and became known throughout all Europe as centre for Austro-Hungarian sugar refinery. In 1870 Diószeg became a town again.
The further development of the village was affected by the rise of the Czechoslovak republic in 1918.
Two world wars, two financial crises, the deportation of the Jews in 1944, the deportation of the Germans in 1946, the deportation of the Hungarians in 1947 to Hungary and Czechia, and the resettlement of the Slovaks from Hungary changed the ethnic complexity of the village.
In 1948 the village was renamed to Sládkovičovo after the Slovak activist Andrej Sládkovič.
On 1. January 1983 Sládkovičovo became a town again. In 1986 Malá Mača village was united with the town, but became independent again in 2002.