While around 35,000 people watched fireworks on the piers of the port town, some 200 rioters erected a street barricade on Hafenstrasse in the St. Pauli area.
According to a spokesman for the authorities, the rioters knocked rubbish containers and refuse on to the streets and set fire to it. Three officers suffered slight injuries. Around 200 officers were on duty.
The vandals retreated into the district streets and police arrested two people, a police spokesman said. Authorities speculated that the violence was initiated by left-wing extremists.
Meanwhile around 180 people gathered around a remand centre under a banner declaring "Support for the Prisoners on New Year's Eve," and broke down the prison's outer gate. Riot police dispersed the crowd.
Elsewhere in the city, unknown people set fire to five cars in the Sasel and Ohlsdorf districts.