A defibrillator including the function for measuring a motion artifact generated when pressing the heart, and a method of operating the defibrillator are provided. The defibrillator includes: a first pair of electrodes that includes a first main electrode and a first sub-electrode arranged adjacent to and insulated from the first main electrode a second pair of electrodes that includes a second main electrode and a second sub electrode arranged adjacent to and insulated from the second main electrode a first measuring unit that measures a first action potential associated with the first pair of electrodes by using the potential difference between the first pair of electrodes a second measuring unit that measures a second action potential associated with the second pair of electrodes by using the potential difference between the second pair of electrodes and an estimating unit that estimates ECG artifacts associated with the difference between the first action potential and the second action potential.