A multiple-energy X-ray imaging apparatus and a method obtain a plurality of X-ray images when the heart of a patient is in the same phase by measuring the electrocardiogram of the patient. A sensor is installed on a handle or a foot stool to measure the electrocardiogram when the patient grips the handle or makes contact with the foot stool without having to attach an electrode to the body of the patient, which removes the inconvenience in measuring the electrocardiogram.