Flames reached the Elviria area on the edge of Marbella early on Friday.
About 1,000 people have been evacuated from the edge of Marbella, about 3,300 from Ojen and others from a camp site at Alpujata, Spanish media report.
They include at least 300 British expats sent to evacuation centres, the UK embassy told the BBC.
Marbella is famous for its up-market hotels and villas - it is a favourite haunt of wealthy foreigners.
Overnight the fire spread rapidly through a 12km (eight-mile) coastal strip, not far from holiday resorts.
Two people have suffered serious burns and some homes have been engulfed by the fire.
The Costa del Sol is one of Spain's most popular holiday destinations and home to a large British expatriate community.
The British embassy says it is working closely with the Spanish authorities and consular staff have been deployed to assist those affected.
Much of Spain's countryside was left tinder-dry this summer by a prolonged heatwave. There have been major wildfires in northern Catalonia - near the Pyrenees - and on La Gomera, in the Canary Islands.
The wind speed has dropped since Thursday and the air is more humid, so there are hopes that the Costa del Sol blaze can be contained soon.
More than 250 firefighters are battling the fire, helped by 17 aircraft dropping water to douse it, Spain's El Pais news website says.
The fire started on Thursday afternoon in the Sierra Negra area of Coin, near Malaga and has now affected an area of some 1,000 hectares (2,471 acres).
Part of the AP-7 highway was cut temporarily, but other roads are unaffected. It is not yet clear how many homes have been damaged or destroyed.