Yes, for the ionic compound that is formed after the posituve and negative ions bond together. But the ions may have higher energy before they combine.
In fact the ions usually have higher total energy than the constituent atoms before the ionic bond is formed. Forming the bond is thus necessary to make the compound stable.
Take sodium chloride as an example. We usually think of sodium as readily giving up its outer (valence) electron to make a positive ion, but there is still some energy that needs to be put in. The ionization energy of an alkali metal like sodium is low but not zero.
The chlorine will take up the electron with some energy release, called the electron affinity of the chlorine. This electron affinity is less than the ionization energy of the sodium, though, so the separate ions have more energy than the neutral atoms.
But there is one more thing. The sodium and chloride ions are mot separate. They are combined by attracting each other to make that ionic bond. It is the energy release from this electrostatic attraction that makes the energy if the