Cespedes fell down on a wild swing on the first pitch he saw, then hit a three-run homer to straightaway center field off Clay Buchholz in the first inning. He connected to deep left in the fourth off reliever Adam Morgan and drove another one way out to left in the fifth against Morgan. Cespedes hit a double and a grounder in his final two at-bats.
Cespedes' home run trots each took almost 30 seconds. The slugger had only hit one homer in the first seven games of the season.
"Any player that hits three homers would have fun," he said through an interpreter. "I think I was seeing the ball well."
Mets manager Terry Collins called Cespedes a "special player" and said he wasn't surprised by his performance.
"Did you see him in BP? He was hitting them out like a driving range," Collins said.
Cespedes hit three homers once before, at Colorado, on Aug. 21, 2015. He is the first Mets player to pull off the feat twice.
The Associated Press contributed to this report.