One of the militants' assaults destroyed a room in the army headquarters where senior officers were to have met but was relocated at the last minute, according to Security Minister Clement Sawadogo.
"If the meeting had taken place in the first room, our army would have been beheaded," Sawadogo said, adding that some of the assailants wore military clothing and seemed to be aware of the planned gathering.
Witnesses told The Associated Press that the attackers had arrived in a pickup truck, and shouted "Allahu akbar!" before shooting.
No one in the embassy was hurt, but a gendarme and the four attackers were killed, French Foreign Minister Jean-Yves Le Drian said in televised remarks.
Gunfire and explosions resounded for hour. Workers fled nearby offices and helicopters were seen above the embassy.
A similar attack unfolded at the army headquarters across town. The assailants also arrived in a pickup and starting shooting at soldiers, said Moussa Korbeogo, a trader at a nearby market.
Heavy smoke rose from the army joint chief of staff's office, where witnesses reported loud explosions. Windows were broken there and in nearby buildings.
"Some of the soldiers ran into a nearby bank to seek shelter. Several were killed outside and inside the premises," Korbeogo said.
Five emergency centres to treat casualties were set up in hospitals, a military barracks and at a stadium in Ouagadougou.