The left-handed pitcher will rejoin his old club, which is now known as the SSG Landers, in the Korean Baseball Organization.
The club issued a statement Tuesday saying the deal is worth up to 15.1 billion won ($12.3 million) over four seasons, the largest contract in the league's history.
Kim pitched for the SK Wyverns, as the Landers were previously known, from 2007 to 2019 before joining the Cardinals on a two-year contract. The 33-year-old Kim became a free agent after the 2021 season.
He was the KBO's regular season MVP in 2008 and won four Korean Series titles with the Incheon-based club.
In two seasons with St. Louis, Kim went 10-7 with a 2.98 ERA in 35 games, including 28 starts. He began the 2020 season as the Cardinals closer, recording a save in his first Major League appearance at the age of 32.
"While pitching in the majors, I got to experience baseball at the highest level and also learned the value of connecting with fans," Kim said in a statement released by the Landers. "I was able to challenge myself in the majors because of support from fans here. I decided I wanted to give back to them once I returned to the KBO.
"The Landers recognized my value with the biggest contract ever in the KBO -- I didn't have to think long and hard about the reunion."
Kim is expected to report for spring training Wednesday.