Pelfrey, who is still less than a year removed from having Tommy John surgery on May 1, tossed a season-low 4 2/3 innings, giving up five runs on nine hits and a walk to fall to 2-2 with a 7.94 ERA in four starts this season.
"I put us in a hole again," Pelfrey said. "It's extremely frustrating on my end. I worked so hard to come back from this injury and I feel good. It just hasn't been too pretty yet. It's been frustrating."
Pelfrey ran into trouble early, giving up three runs in the first after loading the bases, including two runs on a two-out double from Rob Brantly after the Twins failed to turn a potential inning-ending double play.
"Early, I fell behind a lot and made bad pitches," Pelfrey said. "I put myself in a situation where I had to throw strikes and the walk didn't help either. And then I made that mistake to Brantly for that double and they ended up scoring three runs."
The Marlins tacked on another run in the second on an RBI groundout from Giancarlo Stanton after Pelfrey loaded the bases for a second time.
"He threw a lot of pitches early in the game and was up," Twins manager Ron Gardenhire said. "He couldn't put away anyone. He hung in there as long as he could but it was not as good performance for him and I'm sure he'll tell you the same."
The Twins rallied back for three runs in the third against Marlins right-hander Ricky Nolasco. Eduardo Escobar and Aaron Hicks both singled before Brian Dozier walked to load the bases with one out for Joe Mauer.
Nolasco allowed the first run to score on a wild pitch before Mauer came through with an RBI single and Oswaldo Arcia reached on a run-scoring fielding error by first baseman Joe Mahoney.
Miami added a run in the fifth when Brantly doubled home Stanton to chase Pelfrey from the game in favor of long reliever Anthony Swarzak.
Swarzak was able to get out of the jam but surrendered two insurance runs in the seventh, as he gave up three straight singles to Greg Dobbs, Justin Ruggiano and Brantly before handing it over to Ryan Pressly, who promptly gave up an RBI single to Chris Valaika.
"That was fun," said Marlins manager Mike Redmond, who played with the Twins from 2005-09. "We had some great at-bats. Guys really battled. These guys, they've been able to turn the page. We've had some tough losses. We lose that first game and we came out swinging the bats. We've been pretty resilient that way. I'm proud of our guys. We knew eventually we'd get it going and score some runs."
Stanton later gave the Marlins another insurance run with an RBI single in the eighth off Pressly. Hicks plated a run with a sacrifice fly in the bottom of the eighth to cap the scoring for Minnesota.
"The game dragged on," Gardenhire said about the game, which lasted three hours and 41 minutes. "Every time we got closer they added a couple of runs. We kept playing but it just wasn't our night with the pace and the whole package not being good."