A defibrillator including the function for measuring motion artifact generated when pressing the heart, and method of operating the defibrillator are provided. The defibrillator includes: a first pair of electrodes including a first main electrode and a first sub-electrode arranged adjacent to and insulated from the first main electrode a second pair of electrodes including a second main electrode and a second sub electrode arranged adjacent to and insulated from the second main electrode a first measuring unit measuring 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 measuring 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 estimating ECG artifacts associated with the difference between the first action potential and the second action potential.