James scored 32 points and Wade added 24 as the veteran-laden Heat rebounded from Tuesday night's lacklustre 105-94 setback to even the best-of-seven series at 1-1.
Oklahoma City fought back from a 13-point deficit in the last nine minutes and trailed 98-96 when three-time NBA scoring champion Kevin Durant missed a five-footer with 10 seconds left.
James was fouled on the rebound and calmly sank two free throws with seven seconds to play to seal the victory and send the Heat back to South Beach with a much-needed split.
"It's a huge game for us," said James, who had eight rebounds, five assists and hit all 12 of his free throws. "We understood that we wanted to split.
"We had an opportunity in Game One, but it kind of slipped away from us in the fourth quarter, they took control of the game. And Game Two, we wanted to come out and get the win.
"We didn't want to go home being down 0-2 even having three games on our home floor. It was good to see the sense of urgency to start the game, and then late in the game make enough plays to even the series."
Oklahoma City's frenetic running game made Miami look old in Game One and the Heat responded with an 18-2 run to open the Thursday's game and silence the 18,000 fans at Chesapeake Arena.
But the Thunder came roaring back with Durant scoring 16 of his 32 points in the final quarter. Durant had only six points at the half and finished the game with 12 of 22 shooting.
"We can't start off down 18-2," said Durant. "Thinking about it, though, we got some good looks. We missed a few chippies, lay-ins, but we can't get down that much, especially at home.
"We've got to correct it. We've got to just stay positive, man. That's the whole deal. We've got to come ready for Game Three."
Wade responded to his poor game on Tuesday by hitting 10 of 20 shots, grabbing six rebounds and dishing out five assists.
Chris Bosh, who had 16 points and 15 rebounds, said he could not wait to take the court after the series-opening loss.
"Any time you drop a game, especially now, it's not a good feeling, and it stays with you all the way up until you get another chance to redeem yourself," he said.
"We're pretty familiar with that feeling. I don't like it, but it sticks with you. All I could think about was how we could do better because we felt that we made a lot of mistakes in Game One, and it shouldn't have been like that.
"If we play our best basketball and we get beat, that's a whole different story. You're sick in another kind of way. But to know that you could have played a lot better, it was bothering us. We didn't want to have any regrets."
The best-of-seven series shifts to Miami for Game Three on Sunday night.
Heat coach Erik Spoelstra said close games were "what the play-offs are about".
"It just brings out competition, and sometimes you just have to find a way," he said. "It's not always going to go the exact way you want to, and you have to keep on grinding and finding a way to get there at the end. You have to earn it, regardless.
"A four-point win and getting off to a lead and giving it up, well, that's the play-offs."