The energy released/needed for any chemical reaction comes from the breakage and formation of bonds of the reactants and products respectively. So essentially, say for ethanol, the breakage of bonds within ethanol is an endothermic process-energy is required, however, the energy released from forming the bonds of carbon dioxide and water which is the products of the reaction is exothermic-energy is released, and because the energy from formation of bonds is greater than the energy needed to break the bonds, this is an overall exothermic reaction, resulting in a net release of energy to power the engine. But you are essentially on the right track. Check out this link for more information
http://www.elmhurst.edu/~chm/vchembook/512energycombust.html. Hope this helps, if you have any more chemistry questions, you are welcome to pm me