Homes and the local market were burned during the overnight raid on Solhan.
No group has said it was behind the violence, but Islamist attacks are increasingly common in the country, especially in border regions.
The UN chief said he was "outraged" by the incident.
António Guterres "strongly condemns the heinous attack and underscores the urgent need for the international community to redouble support to member states in the fight against violent extremism and its unacceptable human toll," his spokesperson said.
The Burkinabe President Roch Kabore has declared three days of national mourning saying, in a tweet, that "we must stand united against the forces of evil".
The security forces are currently looking for the perpetrators, he added.
In another attack on Friday night, 14 people were reported to have been killed in the village of Tadaryat, about 150km to the north of Solhan.
Last month, 30 people died in an attack in the east of Burkina Faso.
The country is facing a deepening security crisis, like many of its neighbours, as armed groups carry out raids and kidnappings across much of the region.
In May, the Burkinabe army launched a large-scale operation in response to a resurgence of militant attacks. Despite this, the security forces are struggling to prevent the violence that has forced more than a million people from their homes over the past two years.
Africa's semi-arid Sahel region has been hit by an insurgency since militants captured large parts of northern Mali in 2012 and 2013.
French forces have been supporting troops from Mali, Chad, Mauritania, Niger and Burkina Faso to fight the militants.
But this week France halted cooperation with Mali over the recent coup there.