The team announced the signing Friday.
A source with knowledge of the deal told ESPN The Magazine's Chris Broussard the deal is for $40 million over five years. Thornton averaged 21.3 points in 23 games for the Kings after being acquired in a midseason trade with New Orleans.
The Kings also were finalizing a deal with free agent center Chuck Hayes. A second person familiar with that deal says Hayes and Sacramento have agreed to a $21.3 million, four-year deal.
Hayes averaged 3.4 points, 4.7 rebounds and 17 minutes per game in six seasons with the Houston Rockets
Sacramento opens training camp Saturday.
Information from ESPN The Magazine's Chris Broussard and The Associated Press contributed to this report.