Carpenter, a 26-year-old right-hander, made his major league debut with the Cubs last season. He appeared in 10 games but didn't get a decision. His earned run average was 2.79.
He was 21-19 with two saves and a 3.62 ERA over 96 minor league games (60 starts) in the Cubs' organization.
The Red Sox will send the Cubs a player to be named later in exchange for Carpenter.
The trade completes the compensation the Cubs had to make to Boston for allowing former Red Sox General Manager Theo Epstein to move to the Cubs as president of baseball operations.
"I am pleased that the Cubs and Red Sox have resolved this matter," baseball commissioner Bud Selig said in a statement. "It has always been my preference that clubs resolve matters like this amongst themselves, as they understand their unique circumstances better than anyone else could."
Boston also placed pitcher Bobby Jenks on the 60-day disabled list. Jenks, 30, underwent back surgery Dec. 30. He was 2-2 with a 6.32 ERA last season in 19 games last season. He was on the disabled list three times in 2011.
Celebrity Families of 2014 [PHOTOS]