According to the UN humanitarian hub, Reliefweb, the powerful quake struck the country shortly after 10 pm local time on Friday.
It measures 6.8 on the Richter scale at a depth of 18.5 km, with the epicentre located in the High Atlas mountains, some 71 km southwest of the historic city of Marrakech.
Guterres in a statement by his spokesperson, Stephane Dujarric, expressed his sadness over the deadly earthquake, reportedly leaving over 1,000 dead.
Dujarric also said the UN chief expressed his solidarity with the government and people of the country.
According to media reports, several houses in the city of 840,000 collapsed and other buildings suffered structural damage. The epicentral zone is not densely populated.
"The secretary-general was profoundly saddened to learn of the earthquake that hit Morocco today which claimed many lives."
The spokesperson said he offered his most sincere condolences to the families of the victims and wished a speedy recovery to the injured.
In a tweet, the President of the UN General Assembly, Dennis Francis, offered his heartfelt sympathy and condolences, calling on the international community “to stand together in support of Morocco in this time of sorrow.
Amina Mohammed, the UN Deputy Secretary-General, also responded on social media platform, saying that her "prayers and thoughts" were with the people of Morocco.
"The UN is by your side as we strive to recover," she wrote.