Danilo’s deflected effort gave City a half-time lead before Raheem Sterling and Leroy Sane both struck in the space of two minutes early in the second period.
A fourth straight league win since their Boxing Day defeat at Leicester has lifted Pep Guardiola’s side back to within four points of Liverpool in pursuit of back-to-back titles.
Huddersfield remain 10 points adrift of safety at the foot of the table after a ninth defeat in their last 10 league matches.
It was a sobering end to an emotional week for the West Yorkshire club following the departure of David Wagner, but caretaker-boss Mark Hudson can be proud his players gave him their all.
Hudson was clearly intent on stamping his mark on Huddersfield by making six changes.
But they had barely settled when Sergio Aguero, back in City’s starting XI after a three-game absence, spurned an early chance as his side enjoyed plenty of early possession.
Huddersfield also created an early opening, but Adama Diakhaby, making just his third Premier League start, misdirected his header from Elias Kachunga’s cross.
Sterling was furious when referee Andre Marriner waved away his appeals for a penalty after he appeared to have been fouled by Terence Kongolo.
But City took the inevitable lead in the 18th minute with their 100th goal of the season in all competitions.
Danilo’s speculative drive from 25 yards struck Christopher Schindler’s head and wrong-footed goalkeeper Jonas Lossl.
City were given a let-off in the 27th minute when Kyle Walker escaped with a yellow card for his reckless challenge on Chris Lowe as Town dug in.
The visitors failed to carve out a further chance until Ilkay Gundogan fired wide after good work from Kevin De Bruyne and Walker.
Town fans fell silent during the interval as they hung on every word of Wagner’s farewell message played on the big screen.
But City took little notice and cruised through the gears to add two more goals in the space of two minutes.
Sterling dived to head home Sane’s cross in the 54th minute and the latter stole clear on to Aguero’s lay-off to shoot home from eight yards and seal all three points.
Terriers’ substitute Steve Mounie lifted the home fans with a long-range curling effort that flew narrowly wide and then forced Ederson into a flying save with a header from fellow sub Alex Pritchard’s cross.
Town were outclassed by a City side that rarely shifted into fourth gear, but avoided the pasting many of their fans had feared.
They would even have scored just their sixth home goal this season had Mounie not mis-kicked from close range after the ball deflected to him in the box in the final seconds. His miss summed up Town’s season.