On Monday night, he helped them slug their way into first place.
"Very nice. A good night for him," manager Terry Collins said. "That's why we got him. We got him to be that guy in the middle of the lineup who drives in those big runs."
The Mets obtained Cespedes from Detroit right before Friday's trade deadline. Playing for the third time with New York, he tied the team record for doubles in a game.
Fresh off sweeping Washington, the Mets won their fourth in a row and moved a game ahead of the Nationals for the division lead.
"It's obviously a great spot to be in at this point in time in August to say that you have yourself either in contention or on top of the division," said Curtis Granderson, who got three hits, drove in two runs and scored twice.
The Mets topped the 10 total runs they scored while sweeping three from Washington. This win, coupled with the Nationals' loss to Arizona, put the Mets in first place for the first time since June 19.
"It's always nice to be there, but we've got a lot of games to play," Collins said.
There was a brief delay with two outs in the bottom of the ninth inning after Tomas Telis lost control of his bat and it flew into the seats, hitting a fan in the neck. The man was sitting with an ice pack in a tunnel underneath the stands after the game. The Marlins said they would monitor him and expected he soon would be OK to go home.
Michael Conforto hit his first career homer, a three-run drive.
"It was just a blur," Conforto said. "The whole trip around the bases was just a flash in my mind. It's a moment I'll never forget."
Bartolo Colon (10-10) won for the first time since June 12 after dropping his previous six decisions. He pitched eight innings, allowing one run and seven hits. With his win Monday, Colon joined Tom Glavine as the only Mets to win 10 or more games in their age-40 season or later.
"That's a big outing for Bartolo because we need him," Collins said. "If you're going to stay in the race, you've got to get outings and innings from all of your pitchers. He's struggled lately, and tonight was a good outing for him."
Tom Koehler (8-8) gave up seven runs in 4⅓ innings in the Marlins' most lopsided loss of the season.
"Not much you can say about this game," Marlins manager Dan Jennings said. "It was ugly, the worst game we played all year."
Cespedes came into the game 1-for-7 in his first two games with the Mets. He doubled down the left-field line in his first at-bat, hit a two-run double off the right-center field wall in the fifth and added two-run double off the left-center field wall in the sixth.
"He was really close to hitting the ball out of the ballpark a couple times," Granderson said. "It's very impressive to get a chance to watch him swing the bat."
The last Mets player to hit three doubles in a game was Scott Hairston on Aug. 17, 2012.
Conforto homered in the second to center field for a 3-0 lead.
"That ball was crushed," Collins said.
Cespedes doubled in the sixth and scored on two wild pitches by Andre Rienzo.
Christian Yelich had three hits, including an RBI double, for the Marlins.
Marlins: RHP Carter Capps (right elbow strain) was put on the 15-day disabled list after exiting Sunday's game in the eighth. He had an MRI, which showed no structural damage. Capps is 1-0 with a 1.16 ERA in 30 appearances this season.
Mets: LHP Jonathon Niese (5-9, 3.63 ERA) starts Tuesday night in the second game of the series. He is 2-4 with a 2.94 ERA over his past 10 outings.
The Associated Press and ESPN Stats & Information contributed to this report.
Tim Kurkjian is a Hall of Famer! Here's what makes him so great
As Cooperstown calls for our colleague, we share a few favorite memories of working alongside him.
ESPN's Tim Kurkjian is 2022 winner of BBWAA Career Excellence Award
Tim Kurkjian has been awarded the BBWAA's highest honor, winning the 2022 Career Excellence Award.
Time for an NBA-style signing deadline? Why MLB's free-agent frenzy should be an annual event
Last week's lockout pushed teams and players to make huge deals -- and it was FUN. Maybe baseball could learn something from all this.
Kenneth Moffett, federal mediator of 1981 baseball strike and former MLBPA executive, dies at 90
Kenneth Moffett, the federal mediator during the 1981 baseball strike who briefly succeeded Marvin Miller as the second head of the players' association, died last month at the age of 90 in Virginia.
The Mets spent, the Yankees didn't and more: Takeaways from a wild MLB free-agency period
Many agents and executives -- not to mention us -- thought signings would be hard to come by before Dec. 1. They couldn't have been more wrong.
2021-22 MLB free agency, offseason trade news and hot stove updates
Who are some of the top free agents for 2022? Which teams are looking to make big trades? We've got everything you need to know about the hot stove season.