Duke's comeback began with a 3-pointer from the corner by Gary Trent Jr.
On the next possession, Trent scored from the same spot. He was just getting going, and so were the Blue Devils.
The freshman guard scored a season-high 30 points and No. 5-ranked Duke needed less than three minutes to erase a 13-point second-half deficit, scoring 18 consecutive points to overtake No. 25 Miami 83-75 on Monday night.
"We played a great 32 minutes," Hurricanes coach Jim Larranaga said. "And then everything changed. The Gary Trent show began."
The Blue Devils scored 15 points in only six possessions to rally, and the comeback included a trio of 3-pointers by Trent. He shot 9 for 14, including 6 for 9 from beyond the arc.
"Spectacular," coach Mike Krzyzewski said. "Trent got us started."
What inspired the freshman's breakout performance?
"My teammates finding me," Trent said. "Coach drawing up great plays. Everything coming together for me at the right time, and just doing my job."
Duke (16-2, 4-2 Atlantic Coast Conference) extended its winning streak against ranked teams to seven games, including four this season. Miami (13-4, 2-3) lost at home for the first time this season.
"We beat an outstanding team," Krzyzewski said. "We had to play almost like perfect basketball, which we did kind of in the last 11 minutes."
To complement Trent's perimeter game, the Blue Devils had two double-doubles from their front line. Wendell Carter totaled 15 points, 14 rebounds and four blocks, and Marvin Bagley III added 13 points and 12 rebounds.
Trevon Duval had 17 points and eight assists for the Blue Devils, who shot 55 percent and won despite tying a season high with 19 turnovers. They committed none in the final 10 minutes as they rallied.
A sellout crowd of 7,972 included 37 NBA scouts, Miami Heat owner Micky Arison, Alex Rodriguez and Jennifer Lopez. It also included Krzyzewski, back on the bench after missing Saturday's 89-71 victory over Wake Forest because of a virus.
Krzyzewski's sport coat came off when the Hurricanes forced three turnovers during a 16-0 run that put them up 56-44. Duke went nearly eight minutes without a point.
Lonnie Walker IV helped the Hurricanes build their big lead and finished with 19 points and four steals.
"The first 30 minutes were amazing," Walker said. "Then guys kind of went to eat."
Dewan Huell added 18 points and 13 rebounds for Miami, but standout guard Bruce Brown was held scoreless for the first 18 minutes and finished with seven points.
Smothering defense helped the Hurricanes outscore Duke 31-6 on fast-break points. They were up 66-53 with eight minutes left.
"They made us look bad, and we made us look bad," Krzyzewski said. "But our kids turned it around."
The Blue Devils came into the game second in the nation in scoring, and looked it down the stretch.
"They've got a high-octane team, and they go in spurts," Larranaga said. "They have high spurtability."
After Trent sank consecutive 3-pointers, Bagley's three-point play cut Duke's deficit to 66-62. Carter drove for a basket to tie it at 66, and Duval's driving layup on Duke's next possession put them ahead with 4:40 left. The Blue Devils' lead reached 71-66 before Brown ended Miami's drought with a three-point play.
Trent's final 3-pointer helped seal the win, putting Duke up 76-70 with 1:15 to go.
"We were playing like little kids, the coaches said, and we need to play like grown men," Trent said. "We played like grown men in the last 11 minutes."
The Blue Devils played their third consecutive game without injured center Marques Bolden (sprained knee) and forward Javin DeLaurier (hamstring).
Bagley gave Duke fans a scare when he left the game holding his right wrist in the early going, but he soon returned.
Duke: Hosts Pittsburgh on Saturday.
Miami: Visits N.C. State on Sunday.