Two masked individuals riding a motor scooter threw a grenade at a French army vehicle heading for a barracks housing French special services, security forces told RFI.
Three residents of the area were wounded, one of them seriously, but the vehicle was not hit. Macron arrived three hours later for the start of a tour aimed at reinforcing France's influence in west Africa, combating armed Islamists in the Sahel region and stemming the continent's migrant exodus.
"This is a new stage for our relationship with your country and the whole continent," Macron told reporters shortly after being greeted by his Burkinabé counterpart Roch Marc Christian Kaboré.
He praised his host country for shaking off the 27-year authoritarian rule of former President Blaise Compaoré in a 2014 popular uprising in which large numbers of young people participated.
Burkina "is an emblem of the democratic aspirations of Africa's youth", Macron said, adding that that was why he was starting his tour in the country.
Address to students
There was criticism of the visit by young Burkinabés on social media.
They complained about France's support for authoritarian African leaders, including Compaoré, whom it helped leave the country fo Côte d'Ivoire after his fall, and French companies lucrative business deals in the region.
On Wednesday, Macron delivered a speech to 800 students at the University of Ougadougou followed by an "unfiltered" question-and-answer session with his young audience.
He promised to declassify all French documents relating to the assasination of Burkina president Thomas Sankara, who was toppled by Compaoré in 1987.
He was also scheduled to witness the opening of a giant new solar power plant, before leaving for the Ivorian economic capital Abidjan for the fifth Europe-Africa summit, attended by more than 80 leaders from the two continents.
The last stop on his tour is to be the former British colony Ghana, for the first visit by a French president, chosen for its business potential and as a sign that Macron is turning the page on Françafrique, the close relationship between Paris and autocratic leaders in its former colonies.