A system using electrical stimulation of the vagus nerve to treat epilepsy with minimized or no effect on the heart. Treatment includes an implantable signal generator, one or more implantable electrodes for electrically stimulating a predetermined stimulation site of the vagus nerve, and a sensor for sensing characteristics of the heart such as heart rate. Heart rate information from the sensor can be used to determine whether the vagus nerve stimulation is adversely affecting the heart. Once threshold parameters are met, the vagus nerve stimulation may be stopped or adjusted. An alternative embodiment includes a modified pacemaker to maintain the heart in desired conditions during vagus nerve stimulation. In another embodiment, a modified pacemaker determines whether a vagus nerve is being stimulated, whereupon the modified pacemaker may control the heart to maintain it within desired conditions during the vagus nerve stimulation.