Obasanjo told the visiting Mauritania's Fisheries Minister Sidi Mohammed Sidma that only early restoration of democracy will end the country's suspension from the African Union.
"We have condemned the unconstitutional change in ... your country," a presidency statement quoted Obasanjo as saying on Thursday.
Sidma briefed Obasanjo on the rationale for the coup, which was led by Colonel Ely Ould Mohamed Vall.
"That is the stand of African Union and Nigeria. It does not matter how popular your government is." The Nigerian president was quoted as telling Sidma in a meeting in the Nigerian capital, Abuja.
Obasanjo is the current chairman of the African Union, which suspended Mauritania from the 53-nation body after the 3 August coup.
The coup was widely welcomed in Mauritania, a desert nation ruled by President Maaya Sid'Ahmed Ould Taya since 1984, when he took power in a coup himself.