Millwall defender Scott Malone returned to Huddersfield to condemn his former club to a fourth consecutive defeat.
The 29-year-old wing-back failed to net in 28 outings for the Terriers during a year-long spell that came to an end in 2018, but his fourth-minute strike proved enough to earn Millwall a 1-0 win – only their second Championship triumph in 16 contests.
Fraizer Campbell squandered the hosts' best chance of a point when he rattled the frame of the goal from the penalty spot early in the first half.
Millwall made a purposeful start and reaped the reward as Malone grabbed his third goal of the season.
The on-loan Derby defender sidefooted in off Terriers keeper Ryan Schofield's right-hand post from 10 yards after Dan McNamara's left-wing cross had been allowed to travel across the penalty box by a hesitant home defence.
Carlos Corberan's men then wasted their excellent opportunity to level the scores after 15 minutes when Ben Thompson got the wrong side of Lewis O'Brien and bundled into the back of the Huddersfield midfielder as he charged on to Rolando Aarons' ball through the left channel.
But former Manchester United forward Campbell sidefooted the subsequent spot-kick high to Bartosz Bialkowski's right and against the crossbar.
At the other end, Ryan Leonard's ambitious long-range attempt was deflected away from goal, before another positive burst by O'Brien led to a Juninho Bacuna chance that he fired across the face of the away goal.
Bialkowski also dived smartly to keep out Danny Ward's shot on the turn following Harry Toffolo's left-wing raid, while Lions skipper Shaun Hutchinson went close from a header with the last effort of the first half.
The visitors dropped deep in numbers at the start of the second half and Huddersfield struggled to penetrate in the final third with Aarons wayward from 15 yards just before the hour.
On a rare foray forward, meanwhile, Leonard had the ball in the home net, but his shot was ruled out by a puzzling offside flag.
After 72 minutes, a stretching Naby Sarr could only stab wide of the Millwall goal as he was left unmarked at the far post for Bacuna's corner and Huddersfield ended the game having failed to score at home for the first time since a 1-0 loss to Norwich on the opening day of the Championship season.
The Lions, meanwhile, were left to celebrate their first victory at the John Smith's Stadium in seven visits – a sequence stretching back almost 12 years to March 2009.