The Belgian opened the scoring with a superb left-foot shot into the left corner from outside the penalty area.
France forward Karim Benzema scored twice for the hosts, with Uruguay midfielder Federico Valverde getting their other goal.
David Ferreiro scored the visitors’ only goal.
Real, who had lost their previous two home fixtures, made a slow start and were fortunate not to fall behind against a Huesca side without a league win this season.
However, Hazard’s goal sparked Zinedine Zidane’s side into life and Benzema’s neat left-foot finish then doubled their lead.
The pair then combined to lay on the third for Valverde, with Benzema rounding off the scoring with a header after Ferreiro’s tap-in.
Real are now two points clear of Real Sociedad and Cadiz at the top of the table, with Sociedad scheduled to face Celta Vigo on Sunday (15:00 GMT).