However, in his absence, former Southampton playmaker Sofiane Boufal stepped up to inspire Morocco into the knockout stages, where they will face surprise package Malawi on Tuesday in the Round of 16.
Boufal has been one of Africa's most watch-able and eye-catching players since guiding Angers to Ligue 1 promotion in 2015, but his Morocco career has struggled to get off the ground, with the attacker missing out on both the 2017 AFCON and the World Cup a year later.
Under Halilhodzic, however, and with Ziyech overlooked after falling foul of the coach, the former Southampton star has stepped into a key role with the Atlas Lions and is finally making up for lost time in the international arena.
"I've known Boufal for a while, since when he played at Lille, where I previously coached," Halilhodzic told ESPN.
"Everyone can see his talent, and I've spoken to him about his role: he's a boy who can truly make the difference.
"I'm happy for him that he's become a key player within our squad, and he's a very positive presence.
"We have a few players with experience - Yassine [Bonou], Romain [Saiss], Boufal," he continued. "These older players have already been with the national team before, they've experience an AFCON, and these positive leaders will carry the team to success."
Boufal, like Ziyech, has had to carry something of an 'Enfant Terrible' reputation along with him, with questions asked about his application, discipline and ability to make an impact.
However, whereas Chelsea's Ziyech won the Champions League under Thomas Tuchel last season, clinched a Dutch title with Ajax, and was named the club's Player of the Year on three occasions, Boufal has won no major honour during his career and has too often flattered to deceive when opportunities have presented themselves.
"I had some strong discussions with him to explain things," Halilhodzic continued. "We had many hard conversations and I've seen some radical changes; when [the squad assembled] in December, he was the one who pushed the most in training and showed a lot of ambition.
"He's a friendly boy, he has character, but I was hard with him, saying: "You're 28, what have you achieved all these years with the national team? What have you done? Can we change it?'
"'How many have you scored? You're not a good goalscorer. You don't assist much. You participate in the game, but if you're not [making the difference] you can't play at a high level with a big team.'"
Keeper Bounou also noted the change he's seen in Boufal during the latter stages of his international career, telling ESPN: "We all know his quality, and what he can bring for us.
"We see he's a more mature player, the quality he has, and he's a very important player for us."
Long lauded for his technical ability and his dribbling skills -- only two players have averaged more successful take-ons per match in Ligue 1 so far this season -- Boufal has been a difference-maker for Morocco in the ongoing Nations Cup, notably netting the late winner in their opener against Ghana.
"His dribbling shows his quality, but if you dribble without then scoring, it means nothing," Halilhodzic added. "We want to see the ball coming into the box so someone can score.
"85-90 percent of goals we score are inside the box, so if an attacker isn't getting there, we can't score."
Against the Comoros in their second group game, Morocco laboured to a 2-0 victory, but Boufal again offered creativity and menace, creating three goalscoring opportunities -- more than any other player on the pitch -- and testing opposition keeper Salim Ben Boina with three attempts on goal.
Testament to his Boufal's growing importance to the Atlas Lions, Halilhodzic rested him for Tuesday's Group C showdown with Gabon, only to introduce the attacking midfielder in the 57th minute, with Morocco trailing 1-0.
Then, 17 minutes later, he scored from the spot to restore parity, and created one further goalscoring chance during the encounter as the North Africans twice came back to take a 2-2 draw.
"I relaxed Boufal for the third match, and when I brought him on I have him instruction that he must push forward, and he certainly brought his talent [to bear]," Halilhodzic shared. "There's that capacity to eliminate players, to take players on when we're getting close to goal.
"I told him to make things happen, and he did this two or three times, it lifts the team when the play has been slow, but when he's there it's different."
Boufal's form hasn't entirely ended mutterings about whether Morocco will regret casting the talented Ziyech aside, yet the Angers playmaker is certainly vindicating Halilhodzic's show of faith in his ability, and finally writing a memorable chapter in his enigmatic career.