The sides reached an agreement earlier this week, and the team announced the move Friday on Twitter.
Baker, a utility man who can play the infield and outfield, batted .279 with 11 home runs and 21 RBIs in 74 games for Texas last season. The Marlins become the sixth team for the nine-year veteran, who is a .267 career hitter.
Baker has played first base, second and third as well as left and right field.
Marlins president of baseball operations Mike Hill says the team is very excited to add such an experienced player. He says the Marlins like the options Baker's versatility will provide for manager Mike Redmond.