The electrogenerated chemiluminescence of luminol is a process by which light generation is triggered by adding hydrogen peroxide and then applying a suitable electrode potential. Here, we take this phenomenon one step forward by avoiding the addition of hydrogen peroxide using a smart combination of a boron-doped diamond electrode and a carbonate electrolyte to generate the hydrogen peroxide directly in situ. The reaction occurs because of the carbonate electrochemical oxidation to peroxydicarbonate and the following hydrolysis to hydrogen peroxide, which triggers the emission from luminol. The electrogenerated chemiluminescence emission has been optimized by an investigation of the applied potentials, the carbonate concentration, and the pH. Furthermore, these results have been used to shine a light on the reaction mechanisms. Because this method does not require the addition of hydrogen peroxide, it might find application in efforts to avoid instability of hydrogen peroxide or its interference with the analytes of interest.