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.
Will Damian Lillard and the Blazers beat a Golden State team without Stephen Curry? Our 5-on-5 crew forecasts the Warriors-Blazers series.
George Karl said he never felt empowered during his time as the Kings' coach and acknowledged that he and star DeMarcus Cousins never "got into a good place."
The San Antonio Spurs were in rare form in their demolition of the Oklahoma City Thunder on Saturday, but they refuse to rest on their Game 1 showing.