Daniel Murphy doubled to open the frame and David Wright and Lucas Duda followed with RBI singles that handed Rivera (0-1) the loss and a blown save on the same night he had thrown out the ceremonial first pitch in his final appearance at Citi Field.
The win gave the Mets a sweep of the two-game interleague series in Queens. It also extended their winning streak to three games.
Scott Rice (3-3) pitched the ninth in relief of Matt Harvey and picked up the win. Harvey allowed one run and struck out 10 in eight innings.
Hideki Kuroda scattered four hits over seven innings and notched 10 strikeouts. Lyle Overbay drove in the only run for the Yankees with a two-out single in the sixth.
Caroline Berg Eriksen: Soccer player's wife triggers debate with post-birth selfie
Britney Spears on kissing Ryan Gosling, Justin Timberlake in the Mickey Mouse Club