The win gave the first place Diamondbacks their fifth victory in six days, while the Marlins dropped to 32-48 on the season. Miami won Monday's series opener 9-5.
"There weren't a lot of runs tonight, so it was nice to contribute to the ones that we did have," Murphy said. "It was another great job by our bullpen."
Diamondbacks third baseman Jake Lamb started the scoring on Tuesday with an RBI double in the top of the third inning off of Marlins starter Elieser Hernandez. David Peralta then plated Lamb in the next at-bat, also doubling off of Hernandez.
The Marlins got a run back in the bottom of the fourth inning when Bryan Holaday brought in J.T. Riddle on a groundout.
But the Diamondbacks increased their lead in the top of the next frame. Lamb earned a walk in the second at-bat of the frame, before Peralta moved him to second on a single. Ketel Marte struck out before Murphy brought in Peralta and Lamb on an RBI double off of Marlins reliever Ben Meyer, giving Arizona a 4-1 edge.
Marlins second baseman Starlin Castro cut the Diamondbacks' lead in half with a solo shot to the opposite field in the bottom of the fifth inning.
Arizona scored another run in the top of the seventh inning on a sacrifice fly by Murphy. The Marlins got another run back in the bottom of the inning, making the score 5-3.
Miami loaded the bases with two outs in the bottom of the eighth inning but the Marlins were unable to plate any runs.
Zack Godley earned his ninth win of the season, allowing six hits and two runs for the Diamondbacks. He also had four strikeouts and four walks.
"I felt strong throughout the game," Godley said. "I got behind some guys and had to battle through some stuff and ended up not going as deep into the game as I would have liked to. But other than that, a win is a win."
The Marlins host the Diamondbacks in the third game of the four-game series at 7:10 p.m. Wednesday in Miami.