In biology there is a topic called oxidative phosphorylation.
In the first step of this process substrates such as isocitrate is oxidised and the electrons are transferred to coenzymes NAD+ or FAD to form NADH or FADH2. These high-energy electrons are then transferred through a series of electron carriers of electron transport chain. The energy released is used to translocate protons from the matrix to intermembrane space establishing a proton electrochemical gradient across the inner mitochondrial membrane.
How is electrical energy developed by concentrating ions on one side of a biomembrane?