The fire broke out at in Dhaka's Mirpur neighbourhood late on Friday and razed around 2,000 mostly tin shacks, fire services official Ershad Hossain told AFP.
"I could not salvage a single thing. I don't know what will I do," 58-year-old Abdul Hamid, who ran a tea stall inside the slum, told AFP as he broke down in tears.
Authorities eventually got the blaze under control and no-one was killed, although several people had minor injuries, firefighters said.
Many residents -- largely low-income garment factory workers -- were not in the slum as they had left their homes to celebrate the Muslim Eid al-Adha holiday with their families.
"Otherwise, the damage would have been bigger," local police chief Golam Rabbani said.
Around 10,000 people have taken refuge in crammed camps at nearby schools closed for the weeklong holiday, according to Hossain.
"We are providing them with food, water, mobile toilets, and electricity supply," municipal official Shafiul Azam told AFP, adding that authorities were trying to find permanent accommodation.
Some families have erected tarpaulins to shelter them from bouts of rain during the monsoon season, but the wet conditions have turned the fields muddy.
Experts say fires are frequent in Dhaka due to lax safety measures.
At least 100 people have been killed so far this year in building fires across the densely populated metropolitan city.
In 2012, a fire swept through a nine-storey garment factory near Dhaka killing 111 workers. An investigation found it was caused by sabotage and that managers at the plant had prevented victims from escaping.
A 2010 fire in Nimtoli, one of the most densely populated districts of the capital, killed 123 people.