One appliance and crew from High Wycombe and two from Maidenhead attended, along with an officer.
One car was well alight on the hard shoulder when they arrived. Four women and one baby were out of the car.
The incident generated multiple calls to Thames Valley Police.
The firefighters used one set of breathing apparatus and one hose reel jet.
One lane of the motorway was closed while they worked at the scene.
National Highways also attended.