Witnesses said three gunmen arrived at a Turkish restaurant in a pickup truck on Sunday evening and opened fire on customers seated outside, source from the Vietnamnews.
The government then launched a counter-assault, with gunfire heard into the night.
"A terrorist attack at Istanbul restaurant on Ouagadougou’s Kwame Nkrumah Avenue claimed 17 victims, their nationalities are yet to be confirmed, and eight people are injured," a government statement said.
Communication minister Remis Dandjinou said it was not known how many assailants were involved.
"They are confined to one part of the building they attacked. Security and elite forces are conducting an operation," he said on television.
A paramedic told AFP that one of the victims was a Turkish national.
"We evacuated 11 people but one of them, a Turk, died on arriving at hospital," the paramedic said, declining to be named.
Police evacuated civilians from the area before launching the counter-assault, with the heavy exchange of fire becoming more sporadic as the operation went on.
One soldier had said there were hostages on the first and second floor of the two-storey building housing the Turkish restaurant.
The mayor of Ouagadougou and government ministers were on the scene, he added.
Burkina Faso, a poor landlocked nation bordering Mali and Niger, has seen a string of attacks claimed by jihadist groups in recent years.
In December 2016 a dozen soldiers were killed in an assault on their base in the north of the country. And in October that year there was an attack that killed four troops and two civilians.
The worst attack was an assault on a hotel and cafe in central Ouagadougou in January 2016 that killed 30 people including several foreigners.
Gunmen from the Al-Qaeda in the Islamic Maghreb (AQIM) group attacked the Splendid hotel and the Cappuccino restaurant opposite, both popular with Westerners, sparking a protracted standoff with security forces.
AQIM named the three gunmen responsible and published photos of them, dressed in military fatigues and wielding weapons.
The hotel and cafe attack came weeks after jihadists claimed an assault on a top hotel in Bamako, capital of neighbouring Mali, that killed 20 people.