Climate Energy Homes ran the Warm Up Bristol scheme for the local authority, but it has gone into administration, affecting about 2,500 customers.
The firm carried out energy-saving upgrades to people's homes including loft and cavity wall insulation.
George Ferguson said he "guaranteed" no-one would be left out of pocket.
The mayor said: "Either those people [who signed up for the scheme] will get their deposit back or the work will be completed.
"I am defending the interests of all those customers that are involved."
Mr Ferguson said he hoped funding for compensation would come from administrators for the energy firm.
However, he warned those customers affected there would be a delay while Bristol City Council seeks new contractors to take over the scheme.
People in Bristol who signed up to a council-backed home improvement initiative that collapsed will not lose out, the city's mayor has said.