Police were called to a stretch of carriageway between junction 9 and 11 shortly before 5.30am on Sunday.
A Ford Fiesta is believed to have parked behind a lorry to offer help, which police said caused a second lorry to crash into the first.
Highways England said there is approximately "1.5 miles of congestion" on the approach to the southbound closure at junction 9.
If you're travelling #M5 #Gloucestershire today, please be aware of the ongoing closure in both directions between J9 #Tewkesbury and J11 #Gloucester #Cheltenham
There is approx. 1.5 miles of congestion on approach to the southbound closure at J9. pic.twitter.com/KMHryEWFmv— Highways England (@HighwaysSWEST)September 13, 2020
A Gloucestershire Police spokesman said: "The M5 is shut both ways between junction 9 and 11. The southbound lanes are due to be open within the hour however the northbound lanes are expected to remain closed overnight for resurfacing.
"Please plan ahead and consider different routes to avoid the area."
Highways England Network operations manager Beverley Mears confirmed it was working with emergency services at the scene.
Police were called at 5.20am this morning (Sunday 13 September) with a report of a ford fiesta leaving the motorway. A...Posted byGloucestershire ConstabularyonSunday, 13 September 2020
"Due to extensive road surface damage which will require resurfacing the northbound carriageway is expected to remain closed until tomorrow morning so please bear this in mind when planning your journey and consider alternative routes."
It advised drivers heading northbound to leave the M5 at junction 11 and take the A40 then the A417 to the M50 before rejoining the M5 at junction 9.
Motorists heading south should leave the M5 at junction 9 and take the A38 followed by the A40 to rejoin at junction 11.