Carlos Corberan’s Terriers consolidated their position in the play-off positions thanks to two first-half goals.
Ward netted the first in the 31st minute before Holmes doubled the lead from the penalty spot two minute before the break after Fulham goalkeeper Marek Rodak had been adjudged to have fouled Sorba Thomas.
Bobby De Cordova-Reid pulled a late goal back but Marco Silva’s side had to swallow a first league defeat since December 20.
Fulham began with intent although De Cordova-Reid’s volley from a corner beyond the back post was too high.
The Terriers had the ball in the back of the Fulham net in the 14th minute but Thomas, who had earlier tested Rodak, had strayed offside before setting Ward up for a tap-in.
Championship top scorer Aleksandar Mitrovic went in late on Tom Lees and was booked by referee Tony Harrington in the 26th minute.
The Serbia striker almost broke the deadlock when Fabio Carvalho raced into space on the left and rolled the ball across the face of the goal. Mitrovic slid in but could not get a touch.
Huddersfield’s response was to take a shock 31st-minute lead. Ward saw a long-ranger blocked but when Harry Toffolo’s cross from the left bounced off Tom Cairney towards his own goal the striker reacted instantly to rifle through Rodak.
Worse was to follow in the 41st minute when the ball again bounced off a Fulham player towards his own goal – Nathaniel Chalobah this time – and Rodak was penalised for bringing down Thomas.
Fulham protested as it seemed to be a collision rather than a foul but Holmes made no mistake from the spot, despite Rodak getting a touch.
The second period began with Neco Williams firing a long-ranger off target for the hosts, with Carvalho forcing Nicholls into a diving save soon after but the home fans were restless.
Cairney was replaced on the hour mark by Neeskens Kebano but Fulham’s cause was not helped by Harry Wilson scooping a free-kick well over.
Silva was shown a yellow card for words said from the touchline after referee Harrington – correctly – ruled Matty Pearson’s challenge on Kebano in the box was not a foul.
Williams then sent in a cross that eluded Mitrovic and Kebano as it fizzed across goal; Wilson saw an effort deflected over and no action was taken when Jonathan Hogg, who had already been booked, elbowed Mitrovic in the face in the box.
Nicholls pulled off a fine save to keep out Mitrovic’s header but was given no chance by De Cordova-Reid, who controlled Williams ball into the box and lashed high into the net in the 83rd minute.
NIcholls was hurt making a brave save after Mitrovic almost bundled his way through and Huddersfield had to survive a fierce late barrage to bag the points.