Fox Sports was the first to report the deal on Friday.
The move reunites Lackey with former teammates Jon Lester and David Ross. Lackey, Lester and Ross helped the Red Sox win the World Series in 2013. Cubs executive Theo Epstein also was the general manager in Boston when Lackey signed a free-agent deal with the Red Sox in 2009.
The 37-year-old Lackey went 13-10 with a 2.77 ERA in 33 starts for NL Central champion St. Louis this season. He got the start in Game 4 of the NL Division Series at Wrigley Field and pitched just three innings in a season-ending 6-4 loss to Chicago.