Electrochemically induced cyclization of bromoamides to β-lactams has been achieved in room-temperature ionic liquids (RTILs). The use of volatile, organic solvents (VOCs) and of supporting electrolytes may be avoided. Proton exchange reaction between amide substrates and suitable electrogenerated bases gives rise to a C4 carbanion which undergoes cyclization to β-lactam via intramolecular nucleophilic substitution (C3–C4 bond formation). β-Lactams have been isolated in good to elevated yields. The “non innocent” nature of the RTILs (imidazolium-based salts) is considered. Proton exchange reaction between N-dialkylimidazolium cation and EGB yielding N-heterocyclic carbene is discussed.