This paper presents a circuit-level implemented algorithm for removing ambulatory ECG motion artifacts and baseline wander in the analog domain and real-time. The designed circuit is in response to the outpatient diagnosis and treatment needs especially required during the Covid-19 pandemic. In this approach, the R-peaks, as useful components of ECG signals, are detected by a band pass filter and excluded from the baseline wander detection path leading to SNR improvement of 9.82 dB. Thanks to switch capacitor biquad filter, integrator and double sampling sample and hold (S/H) circuits for realizing moving average, linear interpolation and delay chain circuits, this method can be implemented fully on-chip in the analog ECG sensor frontend. Therefore, power consumption and chip area are reduced drastically due to extra digital components elimination. The algorithm is realized in 0.18 mu m CMOS technology with 1.8 V power supply and 6.5 mu W power consumption.