Wright's homer allowed New York to overcome a 1-0 deficit and gave him 735 RBI for his nine-year career, all of it spent with the Mets. He moved past Darryl Strawberry as the team's all-time leader.
New York added three runs in the eighth, two on a pinch-hit double by Mike Baxter.
R.A. Dickey (3-1) limited Miami to a run on three hits in seven innings to get the win. New York has won two in a row after losing five of its previous six.
Mark Buehrle (1-3) took the loss in a seven-inning start, giving up two runs on five hits. The Marlins have dropped four straight.