Peja Stojakovic, who played seven seasons with Sacramento before being traded last season, gave the Hornets an 82-81 lead with a tough shot from near the free throw line with 25.4 seconds left. He finished with eight points on 3-for-11 shooting.
Shareef Abdur-Rahim had a chance to give the Kings the lead, but missed a baseline drive with 1.1 seconds left.
Jannero Pargo made two free throws with one-tenth of a second left as the Hornets (2-5) snapped a five-game losing streak.
Kevin Martin scored 21 points to lead Sacramento (4-2). Ron Artest added 19 points and Abdur-Rahim had 18.
Desmond Mason scored 17 and Bobby Jackson had 13 for the Hornets, who rallied from an 81-72 deficit when the Kings went scoreless over the final 5:49.
Sacramento was without starters Mike Bibby and Brad Miller. Bibby injured his thumb in Sunday nights victory in Reno against the Hornets and is expected to miss the first two weeks of the regular season. Miller watched the game in street clothes nursing an injured finger.