Koehler (3-6) surrendered five hits and five walks. He struck out five.
The Mets had the bases loaded with two out in the second inning but failed to score, and missed another scoring opportunity in the fourth when Juan Lagares was stranded at third after a one-out triple.
Mets' starter Matt Harvey (8-3) took a one-hitter into the sixth inning -- the hit was a third-inning single by Koehler -- before the Marlins reached him for three runs on four hits and a hit-by-pitch for all three of their runs.
Juan Pierre and Christian Yelich opened the inning with singles but Harvey got the next two out. Logan Morrison followed with a base hit that scored Pierre. Ed Lucas was hit by a pitch, loading the bases.
Donovan Solano then sent a soft liner to right that allowed Yelich and Morrison to score.
Harvey, who was pulled at that point, allowed three runs on five hits and struck out eight in 5 2/3 innings.
New York got only one hit after Koehler left the game, when Omar Quintanilla led off the ninth with a single off of Steve Cishek -- who got the next three batters to pick up his 23rd save.
2014: The Year in Music [PHOTOS]