Hudson thundered home when the ball fell to him in the area to give Cardiff, playing in their new red strip for the first time in a competitive fixture, the three points on a night that had looked set to end in frustration.
The result was harsh on the Terriers, who looked assured on their return to the Championship, with the impressive Oliver Norwood and Scott Arfield forcing excellent saves from Cardiff keeper David Marshall but it was not enough.
Norwood almost gave the Terriers the lead six minutes before the break but his wonderful dipping volley was tipped away by an agile save from Marshall as the opening half ended with a burst of activity.
Heidar Helguson hit the bar after Ben Turner headed a Craig Bellamy corner back across goal while the lively Norwood could not control Sean Scannell's cross after the midfielder had rounded Marshall.
Marshall pushed an Arfield effort around a post from Keith Southern's pass while substitute Joe Mason blazed over for the hosts with what appeared to be their last chance until Hudson came to the rescue.