The Royal Moroccan Football Federation earlier this week denied reports the Frenchman had stepped down, but Renard used social media on Sunday to confirm he has left his post.
Morocco endured a disappointing Africa Cup of Nations campaign, exiting the competition in shock circumstances in the round of 16 with a 4-1 penalty shootout defeat to Benin after a 1-1 draw.
The 50-year-old took over the Atlas Lions in February 2016 and guided them to the 2018 FIFA World Cup in Russia, their first qualification in 20 years.
"Morocco will always remain for me a country with which I lived incredible emotions," he wrote in his statement. "I am proud of what we have achieved and how far we have managed to come.
"It is time for me to close this long and beautiful chapter of my life, not without emotion and sadness, but it is an inevitable decision taken well before AFCON 2019."
Renard has led both Zambia and Cote d'Ivoire to AFCON glory during his coaching career.