Lanes between junctions 16 and 17 were closed in both directions due to the incident. A lorry carrying hay bales caught fire on the motorway. Wiltshire Police also warned the closure may last for a "considerable amount of time".
The force said: "The M4 is currently closed in both directions between junction 16 and 17 due to a fire involving a lorry carrying hay bales.
"We are supporting colleagues from the fire service at scene and this closure is expected to remain in place for a considerable amount of time."
Wiltshire Specialist Operations are also at the scene and dealing with the incident.
They said: "RPU are dealing with a large vehicle fire J17 M4 causing large delays."
National Highways South-West also added: "M4 westbound exit sliproad at J17 (Chippenham, Cirencester) is closed due to a large lorry fire.
"The lorry was transporting hay so we expect the fire to take some effort to put out. One lane (of 3) also closed J16-J17.
"Traffic now stopped on the M4 eastbound J16-J17 whilst Fire Rescue deal with the hay lorry which is on fire.
"Due to drifting smoke traffic has been stopped in both directions now on the M4 J16-J17 near Chippenham."
JUST IN: Brexit LIVE: British trade spikes with 822% import surge
Dorset and Wiltshire Fire and Rescue Service said five crews were dealing with the blaze.
Further delays are also being caused due to emergency repairs on the Prince of Wales crossing.
Traffic service Inrix says: "M4 Eastbound closed, queueing traffic due to emergency bridge repairs at J22 M49.
"The road is closed just after the Prince of Wales Bridge.
DON'T MISS
Car ban looks to make roads safer for cyclists as residents complain [Latest]
M1 traffic chaos after car crashes into lorry sparking rush hour delay [Update]
Scotland's busiest motorway CLOSED after multi-vehicle crash [Insight]
"Diversion - via the roundabout and back onto the motorway."
On Monday morning, a crash was reported on the motorway.
Two vans and a car were involved in the incident.
One lane was closed eastbound between junction 24 Coldra and junction 23A Magor Services near Newport.
Lanes reopened at 7.36 but heavy traffic was reported on approach.
Congestion and traffic eased and was back to normal by 8.30am.