Hammel, 32, will get a two-year deal for $18 million with a club option for a third season and a $2 million buyout, according to sources.
Hammel thrived before the trade, going 8-5 with a 2.98 ERA, but struggled in Oakland with a 2-6 record and 4.26 ERA.
Immediately after the season, Hammel was linked to the Cubs, as his Chicago-based agent, Alan Nero, said he was very "comfortable" there. Hammel is a nine-year veteran, having played for current Cubs manager Joe Maddon and the Tampa Bay Rays at the beginning of his career.
Hammel was also a teammate of current free agent Jon Lester when the two pitched in Oakland during the second half of 2014.
Nero is also the agent for Maddon along with new bench coach Dave Martinez, who signed on with the team last week.