The 30-year-old right-hander can earn an additional $200,000 in bonuses based on days on the active roster: $25,000 each for 1, 35 and each additional 10 through 95.
He had become a free agent when the Royals didn't offer him a contract by the Dec. 2 deadline. If he had been offered a contract, he would have been eligible for salary arbitration.
Hahn had Tommy John surgery in 2010, injured his ulnar collateral ligament again during spring training in 2018 and had what is called primary repair procedure on the elbow in August 2018.
He returned on Sept. 5 in his first big league appearance since June 28, 2017, and made six relief appearances in the final month of the season.
Hahn was acquired from Oakland in January 2018 and is 18-21 with a 4.33 ERA in parts of five seasons with San Diego (2014), Oakland (2015-17) and the Royals.