Sheldon McClellan's double-pumping 3-point attempt that would have won it at the buzzer wasn't close to going in.
The short-handed Hurricanes had rallied from a 13-point second-half deficit to force the extra period and led 64-61 with less than a minute left. But Randle twice got to the line, making four straight foul shots for the victory.
The senior, who became the Cardinal's all-time leading scorer in Tuesday's semifinals, finished with 25 points Thursday to end his career with 2,375.
McClellan led Miami with 17 points.
The experimental 30-second shot clock being used in the NIT proved critical after Randle's free throws pulled Stanford to 64-63 with 38.9 seconds left. With the regular 35-second clock, the Cardinal (24-13) probably would have needed to foul. Instead, they played defense, and Deandre Burnett missed a 3-point attempt that might have clinched it.
Randle then leaned into Davon Reed on a jumper to draw a foul and the chance to put Stanford in front.
Miami (25-13) threw the ball away on the ensuing inbounds pass, and after Brown made a free throw with 3.1 seconds to go, the Hurricanes appeared to do it again. But the officials went to the monitor and reversed the call, ruling Stanford touched the ball last. That gave Miami one last chance with the ball under the basket and 1.8 seconds left.
With the scored tied 55-all and just over a minute left in regulation, the game became a contest of the teams' top scorers driving to the hoop. Twice Randle hit shots to put Stanford in the lead only for McClellan to draw a foul on the other end and hit both free throws to tie it.
After McClellan made it 59-59 with 16.8 seconds to go, Stanford worked the ball around for an open 3-point attempt by Marcus Allen, who had made some big second-half shots. But he missed it at the buzzer to send the game to overtime.
Stanford center Stefan Nastic had fouled out late in regulation, and McClellan finally started to find room in the paint in OT. He drove the lane for a dunk to give Miami its first lead since nearly seven minutes remained in the first half, then dished to Reed for a layup and the three-point lead.
McClellan shot just 5 of 16 from the floor with Brown playing tough defense on him, but he was 6 of 7 from the foul line.
With the score tied at 18 and less than six minutes left before halftime, Randle had eight points, an assist and a steal as Stanford closed the half on a 14-3 run. The Cardinal quickly extended the lead to 13 early in the second half.
They were up 10 with under 13 minutes left, but the Hurricanes wouldn't go away. Omar Sherman hit both ends of a one-and-one with 3:27 remaining to tie the score at 53-53.
Miami: The Hurricanes were without starting point guard Angel Rodriguez (wrist) and center Tonye Jekiri (concussion). Backup point guard Manu Lecomte (knee) played only five minutes. … Reed had 16 points and four assists.
Stanford: Randle scored 15 points as a freshman when Stanford won the 2012 NIT title. … Brown, who also started in that game, had 12 rebounds Thursday.