After Stephen Curry gave the Warriors an 89-88 lead with a jumper, John Salmons hit a 3-pointer with 7.6 seconds left to give the Kings a 81-89 lead. David Lee was fouled with 1.3 seconds left and made the first free throw, but missed the second that would have tied the game.
Salmons had nine of his 14 points in the fourth quarter when the Kings outscored Golden State 21-9.
Trailing by 14 points, the Kings used a 16-1 run to take a one-point lead with 4:17 left.
Curry got going in the third quarter, making four 3s and scoring 14 points to help the Warriors outscore Sacramento 30-22 and take an 81-70 lead into the fourth.
The Kings end the preseason Friday at the Los Angeles Clippers. Sacramento opens the season Oct. 30 at home against Denver.
The Warriors, who close the preseason Thursday at home against Portland, won two games on their China trip, defeating the shorthanded Los Angeles Lakers twice last week.
Harrison Barnes (foot injury) missed his fourth straight game. Warriors coach Mark Jackson said he thinks the second-year forward will be ready for the regular-season opener Oct. 30, at home against the Lakers.
Earlier Wednesday the Kings announced that Brendan Malone resigned from his son Michael Malone's coaching staff "based on factors associated with the rigors of coaching in the NBA."
Chris Jent will assume the elder Malone's responsibilities as the Kings' lead assistant coach.
Sacramento forward Luc Mbah a Moute, who missed the previous three games with a sore right knee, went scoreless in 7 minutes in the fourth quarter.
In simple terms, LeBron James did everything. He led all players in the series in just about every stat. Stats & Info recaps his amazing performance.
LeBron James was unanimously named Most Valuable Player of the NBA Finals for the third time following the Cavaliers' Game 7 win to capture their first NBA championship.
Draymond Green made up for missed time, scoring 22 points in Game 7 of the NBA Finals. Stats & Info looks into his remarkable feat.