The Kings won on the road for just the second time this season while Cleveland suffered its third straight loss.
DeMarcus Cousins had his second big game in three outings for the Kings, scoring 18 points to go with 16 rebounds and six assists. He had a triple-double on Sunday in Sacramento's home win over Boston.
Fredette gave Sacramento a four-point lead with 8.9 seconds left, after which Cleveland's Dion Waiters hit a layup to cut the Cavaliers' deficit in half.
Brooks then went to the line, but made just 1-of-2. Cleveland could not take advantage, however, when Kyrie Irving's desperation 3-point attempt failed to go.
Jason Thompson had 19 points and 10 rebounds for the Kings, who led by as many as 10 late in the third period.
Irving scored 22 points and Waiters added 20, but that was not enough to keep Cleveland from losing for the 14th time in 17 games.
Police: Sword-wielding man demanded free tacos
Sign language interpreter at Mandela service called out as fake on Twitter