The Blue Jays, who are five games back of the second American League wild card spot, announced the trade Sunday.
Mayberry has a .213 batting average in 63 games this season with seven doubles, six home runs and 21 RBIs for Philadelphia.
The 30-year-old has been on the disabled list since July 21 with left wrist inflammation, but will come off the DL to join the Blue Jays in Tampa Bay, where they begin a three-game set against the Rays on Tuesday.
Mayberry has posted a .242 career average in 500 games with 52 home runs and 169 RBIs in six seasons with the Phillies.
Pierre, 22, has hit .260 this season with 24 doubles, eight home runs and 43 RBIs in 107 games between single-A Dunedin and double-A New Hampshire.