The Marlins won their fourth in a row and gave the Cubs their fourth consecutive loss.
Murphy broke a scoreless tie in the third with his blast and Ramirez made it a 4-0 game in the fifth with his fourth homer of the season.
Miami broke things open with a three-run sixth that featured an RBI single by pitcher Mark Buehrle. It was only the third RBI of Buehrle's 12-year career, all of it prior to this season having been spent in the American League with the Chicago White Sox. His last previous RBI had come three years ago.
Buehrle (1-2) won his first game with the Marlins, throwing 99 pitches over eight innings while giving up a run on six hits. He struck out five and did not walk a batter.
Matt Garza (1-1) took the loss, allowing six runs on seven hits in five innings.
Celebrity Couples of 2014 [PHOTOS]