The Dodgers also acquired international signing bonus slot number four from the Cubs.
Guerrier, who is expected to join the Cubs later this week, has gone 25-33 with 112 holds, six saves and 3.54 ERA in 513 major league appearances.
Marmol was designated for assignment on June 25, giving the Cubs a 10-day period to trade him or give him his unconditional release. He had a limited no-trade clause with six teams he could block, including the Dodgers.
Marmol is owed more than $5 million on his $9.8 million for this season, and another source said the Dodgers will absorb some of the money owed. He's ending a three-year, $21 million contract with the Cubs, who are the only team he's played for in the majors.
Marmol can become a free agent after this season.
The 30-year-old Marmol went 2-4 with a 5.86 ERA in 31 relief appearances this season. He has struggled for parts of the past three seasons. He struck out 32 and walked 21 in 27 2/3 innings this season. He had 10 blown saves with a 4.01 ERA in 2011 and has lost his closer role several times.
Marmol has 117 saves over eight seasons with the Cubs. His best season as a closer came in 2010 when he had 38 saves, a 2.55 ERA and 138 strikeouts in 77 2/3 innings.