Ahmed Bemba Ould Baya, secretary-general of Mauritania's ruling High Council of State, said: "Their bodies were found this morning after a search ... they were mutilated and had their heads cut off."
Al-Qaeda in the Islamic Maghreb, al-Qaeda's North Africa wing, had claimed responsibility for the abductions.
Several websites published a statement from the group on Wednesday claiming that they undertook the attack.
The statement said that the 12 soldiers had been taken prisoner and that: "This jihadist operation targeted the allies of the Americans, the crusaders on Islamic Mauritanian territory occupied by infidels."
Low-level violence has been ongoing for more than a year in Mauritania.
The government has blamed these attacks on groups linked to al-Qaeda.
Al-Qaeda in the Islamic Maghreb killed four French tourists last year and has called for a holy war to avenge the overthrow of the democratically elected President Sidi Ould Cheikh Abdallahi by the military.