Christopher Ross submitted his resignation in a letter sent last week to UN Secretary-General Antonio Guterres, said the source, who spoke on condition of anonymity.
The move came after Guterres spoke by phone earlier this month with Morocco's King Mohamed VI to ask him to pull back troops from a zone in the contested Western Sahara.
Ross, an American who served as US ambassador to Algeria and Syria, had been harshly criticized by Morocco who accused him of being biased in favor of the Polisario Front.
An insurgency pushing for independence ended with a UN-brokered truce in 1991 and the deployment of a UN mission, MINURSO.
Also Read
Morocco maintains that Western Sahara is an integral part of its kingdom despite a UN resolution that calls for a referendum on the future of the territory.
After former UN chief Ban Ki-moon used the term "occupation" to describe the status of Western Sahara, Morocco reacted with fury and expelled dozens of staff from MINURSO.
The Security Council responded by calling on Morocco to restore "full functionality" of the mission, but only a few dozen staffers were allowed to return.
Disclaimer: No Business Standard Journalist was involved in creation of this content