One officer was shot in the face and the other in the shoulder as a protest rally outside the police station in the Missouri town was dispersing, St. Louis County police chief Jon Belmar told reporters.
He said the officers, aged 32 and 41, were conscious but that their injuries were serious.
Ferguson in recent months has been one of the hot spots for the long-standing US problem of harsh treatment of young black men by mainly white police.
The town is so tense that any new development in the Brown case has proved enough to bring protesters out on the street. The latest twist was the resignation of the police chief and other city officials -- that gesture apparently insufficient for people enraged over the death of Brown.
More From This Section
Brown was killed by white police officer Darren Wilson, igniting angry protests and a national debate about race and law enforcement in America. Wilson was not charged in that death.
"The police officers were standing there and they were shot. Just because they were police officers," Belmar told reporters at the scene of the incident.
About 60 or 70 protesters had come to the police department. Some blocked roads and sidewalks, and this caused authorities to bring in officers, some in riot gear.
Witness Markus Roehrer told CNN that the atmosphere at the protest was tense and that when he first heard the gunfire he thought it might be firecrackers.
"When I saw the cops go down, I said this is far worse," he told CNN.
Belmar said it was not really clear where the shooting came from.
But Roehrer said the sound came from some distance behind the small group of protesters, which he estimated at about 40 when the gunfire rang out.
"To put this on the protesters would be totally unfair," he told CNN.