The blaze broke out between the exit and entry slip roads at J23a (Magor services) and congestion tailed back to junction 23.
One lane was closed for safety because smoke was blowing across the carriageway, Traffic Wales said.
No-one was injured.
A vehicle fire causing severe disruption on the westbound carriageway of the M4 in Monmouthshire has been cleared.