The Dodgers lost their eighth consecutive game while Miami won for just the 11th time this season -- the fewest number of victories in the National League.
Adrian Gonzalez hit a three-run homer for the Dodgers in the first inning and the Marlins caught up in the fourth when Derek Dietrich hit his own three-run blast.
The game remained tied at 3-3 until Pierre singled home Rob Brantly with nobody out in the seventh. A.J. Ellis scored another run later in the inning on a double play grounder off the bat of Matt Kemp.
Miami starter Jose Fernandez (2-2) stayed around long enough to get the win, giving up three runs on eight hits in six innings. Steve Cishek struck out two in a perfect ninth for his fifth save.
The Marlins' go-ahead run was charged to Ronald Belisario (2-4).