Boykins, who was signed by Houston earlier in the day, finished with 10 points in his first action of the season.
Houston built a 107-102 lead in overtime behind four points from Chandler Parsons. Tyreke Evans got Sacramento within three with a layup with 29 seconds left.
Boykins hit two free throws with 21 seconds left and two more 7 seconds later to secure the win.
DeMarcus Cousins scored a career-high 38 points and had 14 rebounds, and Marcus Thornton added 27 points for the Kings, who lost their fifth straight road game. They are an NBA-worst 4-22 on the road this season.
The teams exchanged leads several times in the fourth quarter, and a jump shot by Luis Scola tied it 97-all with 37 seconds left. Thornton made a layup as he crashed to the court before a jump shot by Patterson with 8 seconds left tied it at 99.
Thornton missed a 3-point attempt at the end of regulation to send it to overtime.
Scola had 18 points and 14 rebounds for Houston, and Parsons and Courtney Lee added 16 points each.
It's just the second time Cousins, in his second season, has scored at least 30 points after he scored 30 last April against Oklahoma City. He's now scored at least 20 in five of the last six games.
The Rockets were down by eight before scoring nine straight to take a 91-90 lead with 3 1/2 minutes left.
Cousins scored seven straight points to stretch Sacramento's lead to 81-73 with about 10 minutes remaining.
Houston cut into Sacramento's lead with a 9-5 run that got the Rockets within 86-82 after a layup by Scola with about seven minutes left.
Sacramento led by nine in the third before a 14-5 run by Houston tied it 67-all with about three minutes left in the quarter. Scola scored six points to lead Houston and the Kings missed three layups and had a turnover during the run.
Houston's Marcus Camby grabbed a rebound in Sacramento's lane at the end of the third quarter and launched an amazing one-handed shot that swished through the basket on the other end. The nifty shot will likely become a YouTube sensation, but it didn't help Houston after the officials reviewed the play and said it wouldn't count, leaving Sacramento up 72-71 entering the fourth quarter.
Houston, which needed more depth at guard with Kyle Lowry out with a bacterial infection, signed Boykins to a 10-day contract on Monday. The Rockets got 21 minutes from Boykins in their 10th straight game without Lowry. Boykins' last appearance in the NBA came last season when he played 57 games for the Milwaukee Bucks.
The Rockets spent the night fighting back from a terrible first quarter, where they hit just 6 of 23 shots. Houston used an 8-3 run to open the second quarter and cut Sacramento's lead to 32-27 eight minutes before halftime.
They were still trailing by five points later in the second quarter when the Kings scored six straight points to extend their lead to 44-33 with four minutes left in the second quarter. Thornton scored four of the six points in that span.
Sacramento led 51-42 at halftime after Evans got a steal and took it to the other end for a layup.
The Kings jumped out to a 19-6 lead thanks to a series of easy plays that included four dunks in the first six minutes. The highlight of those dunks came when Donte Greene threw down a reverse amid heavy traffic.
NOTES: Terrence Williams, who the Rockets waived on March 16 and who was signed to a 10-day contract by Sacramento on March 21, had 10 points in about 17 minutes. ... Boykins had a whirlwind day, arriving at the Toyota Center less than an hour before the game. He said minutes after arriving that he was excited to get another chance to play in the NBA. ... Houston's Kevin Martin missed his eighth straight game with a strained right shoulder. ... Houston's Goran Dragic left with about a minute left in overtime with an ankle injury and was helped to the locker room. Houston coach Kevin McHale didn't have any information on the injury after the game.