The Asda at Queen's Drive Retail Park, Kilmarnock, was surrounded by water after the River Irvine burst its banks.
Fire crews were dispatched from Glasgow and Ayrshire after staff alerted the emergency services at 06:12.
A rigid inflatable boat was used to take 40 adults and two children from the store. They were checked by paramedics but no-one was injured.
A spokesman for the Scottish Fire and Rescue Service said the incident ended shortly before 10:00.
Four appliances - two from Polmadie in Glasgow, one from Kilmarnock and one from Newmilns - were sent to the scene.
Firefighters have rescued 42 people who were stranded by floodwater at a supermarket in East Ayrshire.