The Hurricanes won despite Stephen Morris throwing four interceptions, as many as he had thrown all year, while the defense surrendered a season-high 500 yards against the Tar Heels' no-huddle scheme.
But Miami got the stop it needed at the end, with Bryn Renner's final heave into the end zone from the Miami 28 falling incomplete on the game's final play.
The loss was the latest stinging setback for the Tar Heels (1-5, 0-3), who entered the year with hopes of winning the ACC's Coastal Division but now find themselves off to their worst start since 2006. They led this one 23-13 early in the fourth only to see Crawford score twice in the final 11½ minutes to erase the deficit.
Eric Ebron had eight catches for 199 yards a single-game record for a North Carolina tight end while Quinshad Davis also hauled in a touchdown pass from Renner.
North Carolina was going for its first win against a top-10 opponent since beating then-No. 4 Miami here on a last-second field goal in 2004.
Instead, the Hurricanes are 6-0 for the first time since that season, keeping themselves in prime position in the division race to reach the ACC championship game.
That looked like an iffy proposition early when Johnson, who came in averaging 114 yards rushing, left with an undisclosed injury in the first quarter after running for 83 yards on eight carries.
Things got worse for the Hurricanes when receiver Phillip Dorsett suffered an apparent left knee injury on a reverse in that same period. He was helped from the field and eventually to the locker room before returning to the sideline on crutches late in the first half.
Miami got a boost when Ladarius Gunter returned a blocked field goal 67 yards for a touchdown early in the second quarter. Meanwhile, Crawford, a 5-foot-10 redshirt sophomore, kept the offense moving even as Morris kept turning the ball over against the Tar Heels' maligned defense.
Top 25 schedule
• No. 10 Miami 27, North Carolina 23
• No. 8 Louisville vs. UCF, 6 p.m.
• No. 1 Alabama vs. Arkansas, 5 p.m.
• No. 2 Oregon vs. Washington State, 8 p.m.
• No. 3 Clemson vs. No. 5 Florida State, 6 p.m.
• No. 4 Ohio State vs. Iowa, 1:30 p.m.
• No. 6 LSU at Mississippi, 5 p.m.
• No. 7 Texas A&M vs. No. 24 Auburn, 1:30 p.m.
• No. 9 UCLA at No. 13 Stanford, 1:30 p.m.
• No. 11 South Carolina at Tennessee, 10 a.m.
• No. 12 Baylor vs. Iowa State, 5 p.m.
• No. 14 Missouri vs. No. 22 Florida, 10:21 a.m.
• No. 15 Georgia at Vanderbilt, 10 a.m.
• No. 16 Texas Tech at West Virginia, 10 a.m.
• No. 17 Fresno State vs. UNLV, 8 p.m.
• No. 18 Oklahoma at Kansas, 1:30 p.m.
• No. 20 Washington at Arizona State, 4 p.m.
• No. 21 Oklahoma State vs. TCU, 10 a.m.
• No. 23 Northern Illinois at Central Michigan, 1 p.m.
• No. 25 Wisconsin at Illinois, 6 p.m.