The victory sends Norway into a quarterfinal meeting with England, which defeated Mexico 3–2 on Sunday.
Norway enjoyed more possession for much of the match.
An early goal was ruled out for offside, but the Scandinavian side continued to apply pressure.
Brazil was awarded a penalty soon afterward, only for Nyland to make a crucial save.
The Norwegian goalkeeper followed that intervention with several more important stops to keep his team level.
With the match seemingly heading for extra time, Haaland broke the deadlock in the 79th minute with a powerful header.
Ten minutes later, the Manchester City striker doubled Norway's lead, scoring his seventh goal of the tournament and the 62nd of his international career.
Brazil converted a penalty in stoppage time, but the late strike was not enough to change the outcome.
England survived a determined challenge from hosts Mexico to reach the quarterfinals.
The Three Lions controlled the opening stages but struggled to create clear opportunities until Jude Bellingham scored twice in quick succession in the 36th and 38th minutes.
Mexico responded before halftime through Julián Quiñones.
Ten minutes into the second half, England defender Jarell Quansah was sent off after a dangerous challenge.
Mexico's goalkeeper later brought down Anthony Gordon, allowing Harry Kane to convert from the penalty spot for his sixth goal of the tournament and the 14th of his World Cup career.
Mexico was awarded a penalty moments later, with Raúl Jiménez scoring to reduce the deficit.
Despite having more than half an hour to find an equalizer, Mexico could not create enough clear chances to force extra time.
The United States' Round of 16 match against Belgium was overshadowed by political controversy.
Reports said US President Donald Trump had asked FIFA president Gianni Infantino to review the one-match suspension handed to American striker Folarin Balogun.
FIFA later suspended the ban pending further proceedings, while maintaining that its judicial bodies acted independently.
The decision nevertheless drew criticism across the football world and raised questions about the tournament's integrity.
Balogun started but was unable to inspire the US side.
Charles De Ketelaere scored twice for Belgium, while Hans Vanaken and Romelu Lukaku also found the net.
Malik Tillman scored the Americans' only goal from a free kick.
The defeat made the United States the final host nation to exit the tournament.
Belgium will face Spain in Friday's quarterfinal, while Norway takes on England the following day.
Tuesday's matches – Argentina vs. Egypt and Switzerland vs. Colombia – will determine the final quarterfinal pairing.
The quarterfinal stage begins on Thursday with France facing Morocco, while Tuesday's matches – Argentina vs. Egypt and Switzerland vs. Colombia – will determine the final last-eight pairing.
(pu/ał)
Source: IAR, PAP, Reuters