The potential of perennial bioenergy Miscanthus feedstock grown on heavy metal contaminated land was evaluated for the production of clean renewable energy, chemicals, and recovered metals. Trace element analysis showed significant levels of metal contaminants from the harvested Miscanthus: 6.47 g of Pb per kg of biomass, 1.91 g kg−1 Fe, 0.35 g kg−1 Zn, 26.59 mg kg−1 of Cu; along with other metals including Cr, Ni, As and Cd. The protic ionic liquid, 1-methylimidazolium chloride [H1Cim]Cl, extracted 99.3% of Pb from the biomass along with 96–98% of Cu, Zn and Cd, and produced a clean cellulose pulp, which was successfully saccharified into glucose with an 81.5% yield. The behaviour of PbII in aqueous solutions of [H1Cim]Cl showed that this ionic liquid medium supported the electrochemical reduction of PbII to Pb0 using a voltage of − 0.9 V, depositing and recovering 91.5% of Pb from the solution onto the electrode after 1 h of electrolysis. Intensification of process conditions were studied with recycling of the solvent: after the 1st pretreatment, the ionic liquid liquor was recycled and Pb was electrodeposited to clean-up and manage the build-up of metals for a subsequent pretreatment. The electrodeposition step in the ionic liquid liquor did not have a negative impact on the performance of the pretreatment and metal extraction was enhanced by 20% compared to recycled ionic liquid, which had not gone through any electrodeposition beforehand. This study opens up new valorisation possibilities for the integration of highly metal contaminated biomass into biorefining, without the need to incinerate metal contaminated biomass.