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.
What the managers said...
Huddersfield's Carlos Corberan: "We had a target to get three points but, unfortunately, we did not do everything we needed to do to make that happen. They started the game quickly and we conceded an early goal to make things complicated. We did not defend well at the start, but we have had two penalties in the league now and not finished them well.
"We also lost a bit of control in our passing and did not create enough chances, which is something we need to improve, because the only two chances we created in the second half were from set-piece situations. Millwall worked a lot in their defensive half and, when things are compact, you need to open more space on the pitch, but we did not break the last line with our passes."
Millwall's Gary Rowett: "We were on a poor run of form and it's been disappointing after doing well last season and starting well this one and maybe we had gone away a bit from what we are good at to try to be a better team. Huddersfield's home form has been fantastic and they have really unpredictable patterns of play.
"I think the penalty was a bit soft, but I can see why the ref gave it and you're then thinking this could spoil all the hard work, but we got fortunate and they only had one shot on target all game, because our discipline was superb and the determination phenomenal. That was pleasing because I don't think we have shown enough aggression and desire recently and, if we take our foot off the gas, we find it very hard to win games."
Win £250,000 for free with Super 6!
Do not miss your chance to land the £250,000 in Saturday's Super 6 round. Play for free, entries by 3:00pm.