According to an interior ministry spokesman, the final death toll had only been tallied after firefighters and police managed to remove the last of the vehicles.
The pile-up around 10 kilometres (six miles) from the Slovakian capital, Bratislava, happened in the morning during a snowfall accompanied by strong winds, police said.
The motorway was closed in both directions, adding to traffic chaos around the country after a series of other accidents also blocked roads.