A section of the motorway was shut in both directions at J20 B3133 Ettlingen Way (Clevedon) due to the blaze.
Traffic was held on the northbound side since 1.25pm and southbound traffic was held at 1.35pm.
By 2.30pm, trapped traffic was being released in one of the lanes.
Emergency crews are at the scene and motorists are being asked to avoid the area.
At 2.10pm, a spokesperson for Avon & Somerset Police said: ‘A road closure is currently in place on the M5 northbound from between junction 20 (Clevedon) to junction 19 (Portishead) due to a vehicle fire. There are no reported injuries.
‘Long delays are expected and motorists are advised to avoid the route.’
Travel site Inrix said: ‘All traffic being temporarily held and stationary traffic due to vehicle fire on M5 in both directions at J20 B3133 Ettlingen Way (Clevedon).
‘Trapped traffic is being released in lane four.’
By 3.30pm, Avon & Somerset Police had confirmed that the fire had been extinguished.
The force said in a Tweet: ‘A lorry carrying 50 empty kegs and three pallets of bottled cider was found well alight.
‘Firefighters used one high pressure hose reel, two 45mm jets and gas monitors to extinguish the blaze.’
At 4.30pm, National Highways confirmed that lane three and four of the northbound motorway were open past the scene, but lanes one and two remain closed.
In a Tweet, it added: ‘There is currently approx. 8.8 miles of congestion on approach adding at least 60 minutes to normal journey times.’