Police in body armor, gas masks and marching with armored vehicles moved in to disperse the mob of mostly young people about three hours before the midnight curfew came into effect.
Some of the youths carried signs protesting police brutality, TV images showed. Many had their hands up in the air, and others taunted police and threw back tear gas canisters.
"#Ferguson very tense at command centre tear gas fired search for people under way," wrote St Louis Post-Dispatch reporter David Carson on Twitter.
"Once there was a shooting, police had to come in. That being said, I'm troubled by tweets I'm reading saying children were gassed. #Ferguson," wrote Antonio French, a local politician who has been working for days to calm the crowds.
More From This Section
The city has endured violence since a white police officer on August 9 shot dead Michael Brown, an 18-year-old unarmed black teenager.
The protest, held near the site where Brown was killed, followed a much larger and peaceful march outside the Greater Grace Church in Ferguson earlier in the day honoring Brown.
"I'm astonished at the reversal of the mood," civil rights activist Jesse Jackson told CNN, saying that the mood earlier in the day among Ferguson residents had been more constructive.
Images posted by the Post-Dispatch showed vandals smashing the windows of a McDonald's restaurant.
"We were marching peacefully towards the police station just wanting to bend down on our knees with our hands up and say to the police, 'our hands are up, don't shoot.' All of a sudden they turned around and started shooting," Lisha Williams, who was in the march, told CNN.