West Yorkshire Fire and Rescue Service were called to the eastbound carriageway at 10.45pm on Friday, between junction 22 at Denshaw and junction 23 at Outlane.
A lorry had burst into flames and the entire vehicle was destroyed.
Firefighters from the Slaithwaite, Rastrick and Huddersfield stations were rushed to the scene, joined by two crews from North Yorkshire Fire.
Crews used three large jets, the aerial appliance and four breathing apparatus sets to put out the blaze.
The eastbound carriageway was closed to all traffic between 11pm and 5.30am and the westbound carriageway was closed for three hours between 11pm and 2am.
Traffic trapped behind the road closure was turned around by Highways England officers.
Lane closures on the eastbound carriageway remained in place until midday on Saturday as the road was made safe and the vehicle was recovered.