Miami talisman Butler finished with a perfect 23-of-23 free throws -- including a clutch game-winner with just under 13 seconds remaining -- in a nail-biting victory at the FTX Arena.
Butler's haul was part of a remarkable 40-for-40 free throws made by Miami, breaking the old record of 39-for-39 made by Utah against Portland in 1982.
Butler said afterwards he had been oblivious to Miami's record-breaking night from the foul line.
"I had no idea," Butler told reporters. "I'm more excited that we won this game by one point."
Miami coach Erik Spoelstra was also unaware of his team's free-throw record.
"I didn't realise we hadn't missed a free throw," Spoelstra said. "We've been a very good free-throw shooting team all year, but that's crazy."
Miami trailed 111-106 with less than a minute remaining but fought back with a Victor Oladipo three-pointer and a Butler layup to tie the game.
Butler's 23rd free throw of the night edged Miami into a one-point lead with just under 13 seconds remaining before Shai Gilgeous-Alexander's attempted three-pointer to win it for Oklahoma City bounced off the rim.
"We had to make some plays and we did," Spoelstra said of his team's last-minute rally.
Miami improved to 22-20 while the Thunder fell to 18-23.
Elsewhere there were contrasting fortunes for Philadelphia's Joel Embiid and Golden State's Stephen Curry as they returned from injury.
Sixers ace Embiid had missed three straight games with a minor foot injury heading into Tuesday's Eastern Conference clash against lowly Detroit.
But the two-time MVP runner-up looked back to his dominant self with 36 points in just 23 minutes on court as Philadelphia romped to a 147-116 victory at the Wells Fargo Center.
Embiid's points tally came from 12-of-20 shooting, while the Sixers big man also chipped in with 11 rebounds and two blocks.
James Harden and Tyrese Maxey added 16 points each while Tobias Harris had 14 points as Philadelphia led from start to finish to improve to 25-15.
Harden's points tally was part of a second straight triple double. The 10-time All-Star added 12 rebounds and 15 assists.
After jumping out to a 65-43 half-time lead, the Sixers cut loose in a blizzard of scoring in the third quarter with 42 points before adding 40 more in the fourth.
Philadelphia remain in fifth place in the East, 3.5 games adrift of leaders Boston. Detroit are rooted to the foot of the table with a dismal 11-33 record.
But there was disappointment for Warriors star Curry in San Francisco as he returned from an 11-game absence to face a Phoenix Suns team decimated by injuries.
Curry scored 24 points -- including five three-pointers -- but was unable to stop the Warriors falling 125-113 to Phoenix.
Mikal Bridges top-scored for Phoenix with 26 points.
In Los Angeles, Kawhi Leonard's 33 points helped the Clippers complete a 113-101 win over the Dallas Mavericks.
Luka Doncic led the game scoring with 43 points for Dallas, but the Mavs were chasing the game from the outset as the Clippers completed a wire-to-wire win.
In Salt Lake City, Jordan Clarkson's 32-point performance, including a crucial 9-0 run in the fourth quarter, helped the Utah Jazz upset the high-flying Cleveland Cavaliers 116-114.
Lauri Markkanen added support with 25 points while Malik Beasley, Mike Conley and Nickeil Alexander-Walker all chipped in with 13 points each.
Cleveland's Donovan Mitchell produced another high-scoring performance with 46 points but it was not enough to deny Utah victory.