In a tweet, the UN refugee agency's special envoy for the central Mediterranean, Vincent Cochetel, said one person from the West African state of Guinea had survived.
The boat sank off the northern city of Nouadhibou, Mauritania's second largest, according to Cochetel.
"New shipwreck off the coast of Nouadhibou #Mauritania of approximately 40 persons on board, there is one survivor (from Guinea)" Cochetel said on Twitter, without specifying when the incident happened.
Other details about the event remained unclear and some accounts were conflicting.
A Mauritanian security official, who declined to be named, told AFP that the sinking did not take place in Mauritanian waters, but "far from our shores".
The official interviewed the Guinean survivor from a hospital bed in Mauritania, however, who said that he and his friends had attempted to travel from Morocco to Spain's Canary Islands.
The archipelago lies more than 100 kilometres (60 miles) from the coast of Africa at its closest point.
After the boat's engines failed, the passengers aboard the vessel reportedly leapt into the open sea.
"They're all dead, I think. I am the only survivor," the security official reported the Guinean survivor as saying.
Cochetel tweeted that international organisations "are trying to step up efforts to prevent such tragedies, but traffickers keep lying to their clients."
Charlie Yaxley, the UN refugee agency's spokesman for Africa, said that very little information had been confirmed, but that UN officials are "on site providing assistance".
- Perilous route -
Despite the lack of details, the incident bears strong similarities to a migrant disaster off Mauritania in December.
In that instance, 62 people drowned after their makeshift vessel -- also travelling to the Canaries -- hit a rock and capsized some 25 kilometres (15 miles) north of Nouadhibou.
Passengers jumped into the ocean as the craft began taking on water, and 83 people survived by swimming ashore.
Migrants have increasingly opted to risk the perilous route from West Africa to the Canaries in recent years, as authorities have clamped down on crossings from Libya to Europe.
The Atlantic route is especially dangerous as shoddy migrant vessels have to ply the ocean in order to reach the Spanish islands.
At least 170 people are known to have died trying to reach the Canary Islands in 2019, according to the IOM, against 43 the previous year.
SOURCE France 24