Officials say he is now being treated for a light injury at a military hospital in the capital, Nouakchott.
Communications Minister Hamdi Ould Mahjoub said on national TV that a military patrol had mistakenly opened fire on the presidential convoy.
The minister added that Mr Abdelaziz, 55, was injured in the arm and that his life was not in danger.
“On his way back to Nouakchott, the presidential convoy was shot by a Mauritanian patrol as they did not recognise his convoy,” Mr Mahjoub said.
“The Mauritanian people can be reassured, the president is fine… He got out of the vehicle unassisted upon arrival at the hospital, where he walked in without difficulty.”
The hospital remains sealed off by security forces.
President Abdelaziz came to power in a military coup in 2008 in the West African nation. He won presidential elections a year later held under an agreement with coup opponents.
He is seen by the West as a bulwark against Islamists in the region, particularly in neighbouring Mali.