After each team converted its first nine attempts in the tiebreaker, Stanford's Amir Bashti made it 10-for-10 for the Cardinal, and Tar Heels defender Alex Comsia sent his try over the crossbar to end it.
North Carolina (14-3-4) had the two best chances of the game. Late in the second half, Alan Winn was denied by goalkeeper Andrew Epstein, who made a nice save with his legs.
Epstein made the best save of the match in the final seconds of the second overtime on a shot from Tucker Hume. After gaining possession in the right side of the 18-yard box, Hume unleashed a shot that Epstein again saved with his legs.
After a flurry of corner kicks and a free kick in an attacking area, Stanford had the best chance in the first overtime through a header from Drew Skundrich, which went above James Pyle's goal. Foster Langsdorf, the Stanford goal leader who scored in the team's first three tournament games and has 15 on the season, had three shots and two on goal, but was unable to break the deadlock.
North Carolina ends the season recording 14 shutouts, and only allowing 10 goals all season, the lowest figure in NCAA Division I soccer.
Carolina appeared in the College Cup for the fifth time in the last nine seasons, the most occurrences going back to the 2018 campaign.
Stanford (15-3-4) will face Wake Forest in the College Cup final on Sunday. The defending national champion Cardinal also won in a shootout in the semifinals last year, beating Akron.