At least 20 people died and others were taken hostage when Islamist gunmen stormed the hotel in the capital city of Burkina Faso on Friday.
"Mexico regrets this terrorist attack that killed 20 people and left many injured," the Ministry of Foreign Affairs said in a statement.
The ministry sent its condolences to the people and government of Burkina Faso,"and its solidarity with the families of the victims of these deplorable acts."
The assault in Ouagadougou began mid-evening and by 11 p.m. (2300 GMT) the sounds of gunfire and explosions had died down.
"There are people with bullet wounds and people who are injured because of falls," said Robert Sangare, director of Ouagadougou's university hospital centre.
Sangare said one European woman being treated at the hospital told him the attackers appeared to target white people.
The hotel is sometimes used by French troops with Operation Barkhane, a force based in Chad and set up to combat Islamist militants across West Africa's vast, arid Sahel region.
(Story compiled with information from Reuters)