Electrocardiogram (ECG) artefact removal is the major research topic as the pure ECG signals are an essential part of diagnosing heart-related problems. ECG signals are highly prominent to the interaction with the other signals like the Electromyography (EMG), Electroencephalography (EEG), and Electrooculography (EOG) signals and the interference mainly occurs at the time of recording. The removal of the artefacts from the ECG signal is a hectic challenge, for which, a novel algorithm is proposed in this work. The proposed method utilizes the adaptive filter termed as the (Dragonfly optimization + Levenberg Marqueret learning algorithm) DLM-based Nonlinear Autoregressive with eXogenous input (NARX) neural network for the removal of the artefacts from the ECG signals. Once the artefact signal is identified using the adaptive filter, the identified signal is subtracted from the primary signal that is composed of the ECG signal and the artefacts through an adaptive subtraction procedure. The clean signal thus obtained is used for effective diagnosis purposes, and the experimentation performed to prove the effectiveness of the proposed method proves that the proposed method obtained a maximum Signal-to-noise ratio (SNR) of 52.8789 dB, a minimum error of 0.1832, and minimum error of 0.428.