Cardinals general manager John Mozeliak said the team felt obligated to offer a fourth year to the deal because of the presence of other suitors for Cecil.
"I think Brett would be happy to tell you we had a lot of interest in him and we certainly value him being part of our organization," Mozeliak said. "As we look at this market we really felt like he would be the key person to help us in securing a very strong bullpen moving forward."
Cecil said he had never been to St. Louis before traveling with a large contingent of family members to sign his contract.
"This team is rich with baseball history and winning tradition," he said. "They've always had good, winning teams and for my family and I, this is where we wanted to come."
The team designated catcher Brayan Pena for assignment, in order to free a 40-man roster spot for Cecil. The Cardinals still owe Pena $2.5 million next season.
Cecil, 30, went 1-7 with a 3.93 ERA in 54 games with Toronto last season, his eighth with the Blue Jays. The left-hander missed six weeks early in the season because of a strained triceps but was a key contributor down the stretch for the Blue Jays, posting a 3.18 ERA after the All-Star break.
Cecil was a first-round draft pick of the Blue Jays in 2007, when he was selected with the 38th overall pick.
Duke is expected to miss all of next season after undergoing Tommy John surgery, and Lyons has had offseason knee surgery that leaves him questionable for the start of the regular season.
Information from ESPN's Mark Saxon and The Associated Press was included in this report.