The blaze broke out at around 4.30am in a building owned by Leader Spa, a hot tub and bathroom fixtures retailer located on the Route de Lausanne, Vaud cantonal police said.
The warehouse is located close to the motorway between Geneva and Lausanne and the rail line connecting the two cities.
Flames from the fire leapt toward the highway and thick smoke forced authorities to install temporary traffic signals, as motorists stopped to take photos, police said.
A section of the Route de Lausanne in Morges was closed until 8am while 30 firefighters battled the blaze with aid from a Swiss Federal Railways train especially equipped for putting out fires.
Four people were evacuated from nearby homes but were able to return a few hours later, while five vehicles were damaged, police said.
The full extent of the damage from the fire, which remains under investigation, was not disclosed.
Elsewhere, a forest fire covering four hectares on steep mountain terrain broke out on Wednesday in Chamosun in the canton of Valais.
With the area affected impossible to reach by land, three helicopters were deployed to dump water on the flames, cantonal police said.
The cause of the fire was still being investigated, said police.
Both fires occurred in regions of western Switzerland where MeteoSwiss, the national weather office, has issued a warning of “considerable danger” from a heatwave, with higher than normal temperatures for the past six days.