James' jumper from the baseline banged off the rim, giving Golden State the win as Miami lost for just the second time in 12 home games.
David Lee scored 22 points and grabbed 13 rebounds and Jack added 20 points off the bench for the Warriors.
Golden State took a 77-74 lead into the fourth quarter after leading for most of the third.
After hitting a three to tie the game at 87, James gave the Heat their first lead since early in the third with a turnaround 18-footer with 6:41 left for an 89-87 advantage.
The teams played a one-possession game over the next 4 minutes before Lee knocked down a pair of free throws to tie the game at 95 with 1:54 left.
In other games *
At Boston, Paul Pierce scored 34 points, including a three-pointer at the start of the second overtime to give Boston the lead for good, and the Celtics held on to beat the Dallas Mavericks, 117-115.
Rajon Rondo had 16 points, 15 assists and nine rebounds, and Kevin Garnett added 16 points for Boston.
O.J. Mayo scored 24 points for Dallas, and Shawm Marion had 16 points, 11 rebounds and seven assists.
* At Orlando, Josh Smith and Jeff Teague scored 16 points apiece, Al Horford added 13 points and 13 rebounds, and the Atlanta Hawks held off a late charge by the Magic for an 86-80 victory.
* At Indianapolis, Paul George scored 27 points and the Indiana Pacers overcame a 16-point deficit to beat the Cleveland Cavaliers, 96-81.
C.J. Miles scored 28 points for the Cavs, but Kyrie Irving was held to nine points on 4-for-12 shooting in his second game back after missing 11 straight with a broken finger.
* At Toronto, Joe Johnson scored 23 points, Andray Blatche had 14 points and nine rebounds and the Brooklyn Nets beat the Raptors, 94-88, to snap a season-high five-game losing streak.
Ed Davis matched his career high with 24 points and added 12 rebounds for Toronto.
* At Charlotte, Chris Paul had 19 points and 10 assists as the Los Angeles Clippers beat the Bobcats, 100-94, for their eighth straight win.
Byron Mullens had 19 points and eight rebounds to lead the stumbling Bobcats, who have lost nine straight since starting the season 7-5.
* At Oklahoma City, Kevin Durant scored 35 points and the Thunder extended its winning streak to nine games with a 92-88 victory over the New Orleans Hornets, who were led by Brian Roberts' 16 points.
* At Milwaukee, Brandon Jennings scored 19 points, Monta Ellis had 17 points and 11 assists and the Bucks beat the Sacramento Kings, 98-85.
Tyreke Evans had 17 points in his return to Sacramento's lineup after missing three straight games - and five of six - with a sore left knee.
The Kings were without center DeMarcus Cousins, suspended one game by the NBA after striking Dallas' O.J. Mayo in the groin area in their road loss Monday night.
* At Houston, James Harden scored 31 points to lift the Rockets to a 99-93 victory over the Washington Wizards.
* At Minneapolis, Nikola Pekovic had 22 points and 11 rebounds to lead the Minnesota Timberwolves to a 108-105 win over the Denver Nuggets.
* At Phoenix, Goran Dragic's layup with less than a second left lifted the Suns over Memphis, 82-80.