Winger Murphy, who is on loan at West Bromwich Albion until the end of the season, started for the Baggies at Loftus Road.
Darren Moore’s men took the lead early on through Jefferson Montero, but Luke Freeman levelled for the hosts before the break.
Murphy struck just after the hour mark to put the visitors back in front, firing a low shot past Joe Lumley.
And after Tomer Hemed equalised once more from the spot, West Brom won it at the death as Jake Livermore struck to seal the points in added time.
Murphy played the full 90 minutes for the Baggies, adding another strike to his goal against Nottingham Forest last week.
Another winger, Rolando Aarons, found the target for Sheffield Wednesday’s under-23s in their derby win over Sheffield United.
The 23-year-old struck Wednesday’s first goal in their 2-0 win at Bramall Lane, with Achraf Lazaar also featuring in the victory over the Blades.
And in League One, both Dan Barlaser and Liam Gibson were in action as Accrington Stanley recorded a 4-2 win at home to Oxford United.
Midfielder Barlaser started for John Coleman’s men, while full back Gibson entered the fray as an 84th-minute substitute for Sean McConville as Accy sealed an emphatic victory.