The 35-year-old reliever was 2-0 with a 4.15 ERA in 68 games with Tampa Bay last season, when he held left-handed hitters to a .209 average in 91 at-bats. He also allowed just six of 37 inherited runners to score.
In eight-plus seasons he is 14-14 with a 4.43 ERA and 10 saves in 519 appearances.
Cardinals general manager John Mozeliak said improving the bullpen, especially from the left side, was a priority for the offseason.
Tampa Bay declined a $2 million option last month, electing to pay Miller a $400,000 buyout.
Red Sox hire ex-major leaguer Bogar from Rays
Report: Zigic Set For Racing Return In January
Goal.com Champions League Manager: Matchday Three’s Winning Formation