Fifty people were injured in the blaze, which engulfed market stalls and nearby buildings in a packed New Year's Eve market.
"
We are all responsible - let this serve as an example
"
Veracruz Mayor
Jose Gutierrez
Most of the casualties died from the effects of inhaling smoke, officials said.
They warned the death toll could rise further as teams worked their way through burnt-out buildings.
The Hidalgo and Unidad Veracruzana markets in the centre of the port had been full of shoppers, many buying fireworks for New Year celebrations.
Volunteers joined police and emergency workers trying to rescue people and to contain the spread of the blaze which began at around 1800 local time (0000 GMT).
Fireworks could be heard overhead as the teams battled for hours to bring the blaze under control.
City spokesman Carlos Ortiz said it was unclear how the fire started, although there were reports that a passerby threw a cigarette at the stand.
Mr Ortiz said city officials had tried to shut down the fireworks stands only a few days earlier, but were forced to back down because of local resistance.
'Not the first time'
Firework explosions are common in Mexico, where many factories operate with little regard for safety.
Veracruz Mayor Jose Gutierrez told Mexican television: "This is not the first time this has happened in Mexico or in Veracruz.
"We are all responsible. Let this serve as an example."
In September 1999, dozens died in a fireworks explosion in the city of Celaya in the central Mexico state of Guanajuato.