University of Birmingham bioscientists released bacteria into high sugar waste and found that they emitted hydrogen gas as they consumed the substance.
The discovery could have useful implications for the confectionery industry who currently dispose of waste on landfill sites but could now make use of their by-products as a source of environmentally-friendly energy.
Professor Lynne Macaskie, who led the team, said: "Although only at its initial stages, we've demonstrated a hydrogen-producing, waste-reducing technology that, for example, might be scaled-up in 5-10 years' time for industrial electricity generation and waste treatment processes."
For the research, a harmless form of E.Coli bacteria was released into a diluted nougat and caramel mix contained in a 5 litre reactor.
The bacteria produced organic acid and hydrogen as they consumed the sugary waste - at which point another type of organism was introduced to convert the acid into further hydrogen.
Hydrogen is a non-polluting form of energy which, when fed through a fuel cell device, reacts with oxygen to produce electricity.
Any form of confectionery waste would produce the same result if levels of sugar were adequate and, according to microbiologist, Dr David Penfold, who helped create the technology involved, the process could be widely applied in countries with a high sugar surplus.
The University said that the technique would be practical on a larger scale, according to an economic assessment undertaken by project partner C-Tech Innovation.
Funded by the Engineering and Physical Sciences Research Council, the study took 15 months to complete and was given a budget of nearly £24,000 (€35,051).