Hamels will make $20 million next season on the team option. The Cubs had until 4 p.m. ET Friday to make a decision on retaining him. Had the Cubs declined Hamels' option, the Rangers would have had to pay him a $6 million buyout as part of the July trade that sent him to Chicago.
The 34-year-old Hamels went 9-12 with a 3.78 ERA in 32 starts in 2018. Hamels and his agent, John Boggs, have said they would be open to exploring a longer-term deal.
Smyly did not pitch for the Cubs last season as he continued his recovery from Tommy John surgery in June 2017. Smyly, 29, has a career ERA of 3.74, with a 31-27 record in five seasons with the Detroit Tigers and Tampa Bay Rays.
Trading Smyly saves the Cubs $7 million in 2019 as they prepare for free agency.
Hamels gives manager Joe Maddon a deep group of starting pitchers as the Cubs try for their fifth consecutive playoff appearance. Jon Lester, Kyle Hendricks, Jose Quintana and Yu Darvish also are expected to return, with Mike Montgomery and Tyler Chatwood waiting in the wings.
The Cubs did not give a qualifying offer to left-handed reliever Justin Wilson, who had a 3.46 ERA in 54 2/3 innings last season.
ESPN's Jesse Rogers and The Associated Press contributed to this report.