A controversial early penalty by Matt Ritchie – awarded after he had gone down under the challenge of Nahki Wells – put the Sky Bet Championship leaders ahead in the 10th minute, and Murphy doubled their advantage on 33 minutes.
Aaron Mooy gave Town hope with a spot-kick 18 minutes from time before Dwight Gayle sealed the triumph in stoppage time to send Rafael Benitez’s side 11 points clear of the third-placed hosts.
Town failed to clear the resulting corner, and Jonjo Shelvey had a shot blocked – and appeared to handle the ball – before Ritchie set off towards goal and went down under the challenge of Wells.
There appeared minimal contact but the referee pointed to the spot, and Ritchie fired home to Ward’s right to give the visitors a 10th-minute lead.
The home side took time to recover from the early blow, and Newcastle were determined not to let them regain the initiative.
Town worked their way back into the game and Michael Hefele got on the end of a corner but it was deflected out before Philip Billing produced a thumping individual effort from 30 yards which was beaten away by Karl Darlow.
Newcastle made it 2-0 in the 32nd minute, however, after a great ball over the top from Shelvey.
Murphy’s first touch was not good and Ward came out to gather but, as the two players came together, the ball squirmed from his grasp and Murphy slotted past Hefele on the line.
Town were furious, claiming Ward had had the ball under control before it was hooked from his grasp by Murphy, but their protests fell on deaf ears and centre-back Christopher Schindler was booked.
Darlow got his body behind a shot from Izzy Brown and Wells dragged a free-kick wide in first-half stoppage time as Town tried to get back into the game.
Huddersfield replaced Ward, who had a dead leg, with Joel Coleman at the break, and immediately put the leaders under pressure at the start of the second period.
Midfielder Billing had two chances to pull the hosts back into the game but his first effort drifted high and wide and he failed to connect cleanly with a second, seeing the ball bobble wide.
Shelvey denied Brown when he brought him down 20 yards from goal and earned a booking. Wells’ free-kick was no threat to Darlow’s goal, though.
Shelvey was the centre of more controversy when he was adjudged to have fouled Elias Kachunga in the box. Referee Roger East gave the penalty and Mooy coolly slotted into the bottom-left corner to give Town hope of a comeback.
But Newcastle sealed the points in the 90th minute when a long clearance from the back bounced over Coleman and left top scorer Gayle, on as a substitute after injury, on his own to slot home his 21st goal of the season.