When an action potential passes through a neuron, heat is first produced and then reabsorbed by the neuronal membrane, resulting in a small measurable temperature spike. Here, we describe the thermodynamics and molecular features of the heat production using a coarse-grained molecular dynamics approach. We study a simple unicomponent lipid bilayer membrane surrounded by physiological salt solution with and without an external electric field, which represents an imbalanced charge across the membrane. We show that the temperature increases significantly upon removal of the electric field under constant pressure conditions. The potential energy converted to heat is initially stored mainly in the imbalanced ion distribution across the membrane and the elastic energy of the membrane has only a minor role to play. We demonstrate that the mechanism of heat production involves interaction between ions as well as lipid headgroup dipoles while the interactions between polar water molecules and lipid headgroup dipoles absorbs a considerable portion of such produced heat upon removal of the electric field. Our data provide novel thermodynamic insights into the molecular processes governing membrane reorganization upon discharging of lipid membranes and insight into energy metabolism in nerves.