Ismael Saibari put Morocco ahead in the 21st minute, finishing from a clinical counterattack set up by Bilal El Khannouss, before Vinicius Junior restored parity for Brazil with a moment of individual brilliance.
Neither side could find a winner despite further chances at MetLife Stadium in East Rutherford, New Jersey, in a contest played in difficult heat for long periods.
Brazil had entered the match as heavy favourites, with statistical models giving them close to a 58 per cent chance of victory against Morocco's 19 per cent, with a draw rated at just over 23 per cent.
Speaking to FOX Sports after the final whistle, Hakimi reflected on a performance that exceeded those expectations against a side many regard as genuine contenders for the title.
"It was not easy," Hakimi said. "They are one of the favourites for the tournament. We drew but we are happy with the performance."
The Paris Saint-Germain full-back, who also had an early shot on goal in the seventh minute, said Morocco's focus now turns to building on the foundation laid in New Jersey.
"We still have to improve every game and that is what we are going to be focusing on right now," Hakimi said. "We have to keep going. We have to keep the positives and learn from the mistakes."
The result extends a recent run of strong showings for Morocco against Brazil, having beaten the five-time champions 2-1 in a friendly back in 2023, their first win over the South Americans after Brazil had taken the two earlier meetings between the nations, including a group-stage clash at the 1998 World Cup.
For Brazil, the draw means a tournament that began with significant expectation now opens with a stumble, leaving Carlo Ancelotti's side to regroup before their next Group C fixture.
A point apiece leaves both teams level after the opening round, with the group picture still wide open as attention turns to the remaining fixtures.
For Morocco, under coach Mohamed Ouahbi, the challenge now is to convert Hakimi's optimism into results that carry the team beyond the group stage and justify their billing among the tournament's most talked-about outsiders.