Morocco started on a high finding the net within a minute at the Reunification Stadium in Douala, Cameroon.
Soufiane Rahimi found space to slot the ball past Zambia’s goalkeeper Allan Chibwe.
It was a case of poor defending by the Zambian backline giving Rahimi space to tap-in.
The defending champions continued to press in numbers and increased their lead after only eight minutes.
Mohammed Al Bemammer nodded in for Morocco after goalkeeper Chibwe mistimed and failed to punch out the ball from a corner.
Zambia were reduced by one player after Zachariah Chilongoshi was sent off for a bad foul on Abdelilah Hafidi after 20 minutes of play.
The referee had earlier dished out a yellow card to the Zambian defender, but pulled out the red card after further check on the VAR screen.
After 29 minutes the Chipolopolo had a chance to pull a goal back, but Clement Mwape Mulashi headed out.
The Zambians were punished again in the 39th minute when Paul Katema handled the ball in the box for a penalty.
Morocco’s captain Ayoub El Kaabi made no mistake from the spot.
In the second half the defending champions with a slower passing approach as the Zambians battled back strongly.
Substitute Moses Phiri pulled a goal back for Zambia after 79 minutes when he beat Morocco’s goalkeeper Anas Zniti to the neat post.
The Atlas Lions continued to push forward to look for more goals, but the Zambians defended in numbers.
Morocco will now face hosts Cameroon at the semi-final stage on February 3rd at the Limbe Omnisport Stadium.