During a chemical reaction, when energy is evolved, energy comes from the the bonds which form in the products. When the bonds form, they release some energy, which is evolved in the reaction. However some energy is also needed in the reaction for breaking the bonds. But if overall, energy is negative, then energy is evolved.
Regards