Ion-beam cancer therapy is a promising technique to treat deep-seated tumors; however, for an accurate treatment planning, the energy deposition by the ions must be well known both in soft and hard human tissues. Although the energy loss of ions in water and other organic and biological materials is fairly well known, scarce information is available for the hard tissues (i.e., bone), for which the current stopping power information relies on the application of simple additivity rules to atomic data. Especially, more knowledge is needed for the main constituent of human bone, calcium hydroxyapatite (HAp), which constitutes 58% of its mass composition. In this work the energy loss of H and He ion beams in HAp films has been obtained experimentally. The experiments have been performed using the Rutherford backscattering technique in an energy range of 450-2000 keV for H and 400-5000 keV for He ions. These measurements are used as a benchmark for theoretical calculations (stopping power and mean excitation energy) based on the dielectric formalism together with the MELF-GOS (Mermin energy loss function-generalized oscillator strength) method to describe the electronic excitation spectrum of HAp. The stopping power calculations are in good agreement with the experiments. Even though these experimental data are obtained for low projectile energies compared with the ones used in hadron therapy, they validate the mean excitation energy obtained theoretically, which is the fundamental quantity to accurately assess energy deposition and depth-dose curves of ion beams at clinically relevant high energies. The effect of the mean excitation energy choice on the depth-dose profile is discussed on the basis of detailed simulations. Finally, implications of the present work on the energy loss of charged particles in human cortical bone are remarked.