The big striker netted on 22 minutes, running through unchallenged, after Antoine Semenyo had dummied an Alfie Mawson pass, and wrong-footing goalkeeper Ryan Schofield before shooting into an unguarded net.
Diedhiou doubled the advantage four minutes later, latching onto Kasey Palmer's ball into the box and firing low past the exposed Schofield.
Juninho Bacuna reduced the deficit with a close range shot from Isaac Mbenza's clever backheel just before the hour. And it took a brilliant late save from Dan Bentley to preserve three points for the hosts when he kept out Bacuna's late volley from 25 yards.
Huddersfield were unlucky on the balance of play but Diedhiou now has six goals in his last seven appearances and is keeping City's play-off bid on course.
Both sides had chances in an open start to the game. Nahki Wells should have done better for City than glance a header wide from Adrian Mariappa's second minute cross, before Lewis O'Brien's penetrating run ended with a shot that was tipped onto a post by Bentley in the seventh minute.
While Diedhiou's double salvo looked to have put City in command, the visitors still threatened going forward and O'Brien had another effort blocked.
The second half began like the first, Semenyo breaking clear for City only for his control to let him down, before Bentley raced from his line to deny Fraizer Campbell.
The dangerous O'Brien saw his low drive blocked in a crowded box and a Campbell shot was deflected for a corner as Huddersfield threw everything into attack.
Bacuna's goal was well deserved and Campbell should have made it 2-2 soon afterwards, volleying badly wide from Toffolo's pinpoint cross.
It reflected Huddersfield's dominance as Vallejo thundered a shot against the crossbar from 30 yards – the midfielder's last contribution as he made way for Alex Pritchard.
After Bentley's acrobatic tip over from Bacuna, Pipa's added-time shot was deflected onto a post – but the hosts held on.