United secured their first home win in the Championship this season.
Posh had lost all five previous league games at London Road this season, but striker Boyd opened the scoring in the 16th minute and then struck his fifth goal of the campaign eight minutes later to put Darren Ferguson's side in control.
Teenager Saido Berahino, making his first start for Peterborough since arriving on loan from West Brom, set up both goals before Boyd sent over a cross for defender Kgosi Ntlhe to head home his first senior goal and Posh's third in the 48th minute.
Winger Adam Hammill pulled one back in the 51st minute for Huddersfield, who had won their last three on the road, but Peterborough had chances to extend their lead, with Boyd denied his hat-trick by visiting goalkeeper Alex Smithies in the closing stages.
Midfielder Grant McCann, Ntlhe and forward Lee Tomlin all returned for Peterborough, while striker Berahino was also included. Huddersfield were unchanged from the side that started the weekend win over Wolves.
Berahino dragged a left-footed shot wide in the fifth minute and before Huddersfield had troubled Posh goalkeeper Robert Olejnik, the teenager laid the ball off on the edge of the penalty area and Boyd arrowed a low shot into the bottom corner for the game's opening goal.
Tomlin then had a shot blocked by Huddersfield midfielder Adam Clayton before Peterborough pair Berahino and Boyd combined again to double their side's advantage in the 24th minute.
This time Berahino slipped the ball inside to Boyd from the right and the Posh forward unleashed a low thunderbolt from 35 yards that nestled into the centre of goal.
Berahino spurned a gilt-edged chance for the home side just before the break when he pulled a low shot across the face of goal.
But Peterborough did not have to wait long for their third goal. Boyd supplied the cross from the right side of the area and Ntlhe stole in at the far post three minutes into the second half to head the ball into the top corner.
Huddersfield boss Simon Grayson instantly responded by sending on Hammill for Ward and defender Paul Dixon for Calum Woods, and his tactical switch paid instant dividends.
Hammill, on loan from Wolves, cut in from the left to the edge of the area and drilled a right-footed shot into the bottom corner.
The visitors then enjoyed their best spell as they chased a second before Posh almost regained their three-goal lead when defender Mark Little whipped the ball across the six-yard line only for Boyd to miscue with the goal at his mercy.
Smithies was forced to keep out Berahino's shot with his feet and then Posh defender Shaun Brisley missed a chance to put the result beyond doubt when heading McCann's corner wide before Boyd was denied by the visiting keeper in the last minute.