Morocco weren't at their attacking best in the first half but two goals from Azzedine Ounahi (50', 82') and a late effort from Soufiane Rahimi (90+8') sealed a comprehensive victory.
The Atlas Lions made a name for themselves at the 2022 World Cup in Qatar as they beat Spain and Portugal in the knockout rounds before a 2-0 semi-final defeat to France.
They now have a chance at revenge as they face Kylian Mbappe's France in the quarterfinals at Boston Stadium on Thursday.
Speaking after their recent win, Ouahbi said: "We're no longer a surprise today and that's a great source of pride.
"I think this is only the beginning and I hope we'll keep producing this kind of run for many years."
Looking ahead to their next clash, the coach added: "We want to go as far as possible and make our people proud.
"What we're trying to get across to our players is that we're playing in a World Cup, which means you go through difficult moments.
"What we needed to do was hold on and show resilience when things aren't going so well."
Canada boss Jesse Marsch said after the game that his side were the better team.
Ouahbi clearly disagreed, adding: "In terms of intensity they were good, that has to be said. Were they better? Hard to say that when you lose 3–0, it's a bold claim.
“They were well organised, but I think in the second half there was no contest. In any case. I'm not sure many teams are going to win by that scoreline in the round of 16.”