Cardiac diseases constitute a major root of global mortality and they are likely to persist. Electrocardiogram (ECG) is widely opted in clinics to detect countless heart illnesses. Numerous artifacts interfere with the ECG signal, and their elimination is vital to allow medical specialists to acquire valuable statistics from the ECG. The utmost artifact that is added to the ECG signal is power line interference (PLI). Numerous filtering methods have been employed in the literature to eliminate PLI from noisy ECG. This article proposes an extended Kalman filter (EKF)-based adaptive noise canceller (ANC) that comprises PLI frequency as a distinct model parameter. Thus, it is capable of tracking PLI with drifting frequency. The proposed canceller's performance is compared with state-space recursive least squares (SSRLSs) filter-based PLI canceling. The evaluation is carried out for four cases of PLI, that is, PLI with known amplitude and frequency, PLI with unknown amplitude and frequency, PLI with drifting amplitude and frequency, and PLI removal from a real-time ECG recording. The samples of the Massachusetts Institude of Technology (MIT)-Boston's Beth Israel Hospital (BIH) arrhythmia database are considered for the first three cases, whereas, for the fourth case, real ECG signal is taken from armed forces institude of cardiology, the national institude of heart diseases (AFIC/NIHD), Pakistan. Mean square error, frequency spectrum, and noise reduction are selected as performance metrics for comparison. Simulation results depict that the presented EKF-based ANC system outperforms the SSRLS-based ANC system and effectively eliminates PLI from ECG under all four investigated scenarios.