The Cubs pounded out four home runs, with Sterlin Castro, Dioner Navarro and Ryan Sweeney adding solo blasts.
The Marlins went deep twice. On the strength of a grand slam by Adeiny Hechavarria and a two-run shot by Logan Morrison, they led 7-4 when reliever A.J. Ramos entered the game in the seventh and walked the first two batters he faced, Darwin Barney and Anthony Rizzo.
After a passed ball advanced the runners, Navarro hit a dribbler off the end of the bat down the left-field line for a single that scored both runners and made it 7-6.
That was all for Ramos as Ryan Webb came on. He didn't fare any better as Murphy, who played with the Marlins last season, hit the first pitch from Webb (2-6) into the left-field bleachers.
"I know that guy's a sinker ball guy," Murphy said of Webb. "I was looking for a sinker, he gave it to me and I put a pretty good swing on it."
The Cubs added an insurance run in the eighth on Castro's double.
Carlos Villanueva (4-8) got the win. Kevin Gregg, despite walking the potential tying runs on base, worked out of a jam for his 29th save in 34 chances.
But, of course, the star of the game was Murphy, who was considered nothing more than a placeholder for the remainder of the season when he arrived but now has to be considered for the future even though he's no youngster at 30.
"I don't want to get too far ahead of myself and starting thinking about it a little too much and maybe it's affecting my play on the field," he said of next season. "I don't want to do that, but at the same time, it's at that part in September when it does start to get in the back of your mind a little bit more."