The incident occurred just hours after Ferguson police chief Tom Jackson resigned after the department of justice said that the police department and the court system of Ferguson were racially biased.
Jackson's announcement had led to protests near the police headquarters. However, the police said that the shooting took place after the protesting crowd had thinned.
St Louis County Police said in a news conference that the attack was an ambush.
One of the two injured officers was shot in the face but the police said the injuries were not life-threatening.
Police said the shots had not come from the protesters and the police officers were shot just because they were police officers.
Ferguson has been on the boil ever since the shooting of an unarmed black teenager Michael Brown by a white policeman in August last year.