MIAMI -- With his first swing of the night, Yasiel Puig snapped a slump and silenced speculation he's in the doghouse.
Puig was held out of the starting lineup after going hitless in his past 11 at-bats. He also drew a fine when he arrived late for pregame drills, raising more questions about the 22-year-old Cuban's maturity and comportment.
He entered the game in the sixth inning in a double switch, batted for the first time leading off the eighth and needed only one pitch to break a 4-all tie. Puig pulled a ball that landed on top of the wall before bouncing over for his 12th home run since breaking into the majors June 3.
"I'd like to have a guy like that coming off the bench," Marlins manager Mike Redmond said with a wry smile.
Puig pointed to the sky with both hands as he crossed the plate and received a jubilant greeting in the dugout, where teammate Hanley Ramirez jumped on him for a piggyback ride.
"We're always expecting something great," Dodgers pitcher Chris Capuano said. "He's just got so much ability. He got a pitch and drove it, and what a spot to do it in. He doesn't seem like he feels too much pressure out there."
Manager Don Mattingly said Puig was animated as usual in dugout in the early innings, and didn't sulk about not starting.
"He's not a problem," Mattingly said with a chuckle. "Just a lot of stuff happens. He's not a guy I think about that much and worry about."
The Dodgers broke a two-game losing streak, their longest in two months. They won despite blowing a 4-1 lead and hitting into four double plays.
"It was kind of a weird one," Mattingly said.
Miami also had plenty of baserunners but went 2 for 14 with runners in scoring position. Shortstop Adeiny Hechavarria committed two errors, and each led to an unearned run.
Marlins starter Jacob Turner walked the pitcher with two out in the fourth, and the Dodgers went on to score four runs in the inning. Turner allowed 10 hits and five walks in five innings and remained winless in his past seven starts.
"We aren't a team that can make a lot of mistakes and still win ballgames," Redmond said. "Our margin for error is very tiny. Against a great team we've got to play a great ballgame, and we made a couple mistakes, and they took advantage."
Chris Withrow (2-0), the fourth of seven Los Angeles pitchers, threw 1 1/3 scoreless innings. Capuano allowed three runs in five innings, and Kenley Jansen pitched a perfect ninth for his 20th save in 23 chances.
Puig, a favorite with Miami's Cuban community, drew a big ovation when he stepped to the plate for the first time.
"I wasn't in the lineup early," he said, "but it felt really good once I was in the game that I got a lot of support from the fans."
His homer came on a low slider from Dan Jennings (2-4). Puig sprinted out of the batter's box, unsure whether the drive would clear the fence.
"Like always, I'm just trying to put a good swing on the ball and hit it as hard as I can," Puig said. "I knew I hit it hard, but you never know if it's going to be a home run."
Amid all the hitting, a base on balls was especially costly to Miami.
The Dodgers trailed 1-0 and had a runner at third with two out when Tim Federowicz was intentionally walked. Turner then walked Capuano on a 3-1 pitch, and the Dodgers took advantage of the lapse.
Carl Crawford's RBI infield single made it 1-all. Mark Ellis followed with another RBI infield single, and when Hechavarria made an errant throw to first, another run scored. Gonzalez singled home another run for a 4-1 lead.
Since July 23, when LF Christian Yelich joined the Marlins, he and Puig are tied for the most hits by a major league rookie. ... The Dodgers hit into four double plays for the fourth time this year. ... Attendance was 25,690, giving the Marlins their largest back-to-back crowds this year.