Removing motion artifacts from an ECG(electrocardiogram) is one of the common issues to be considered during real-time ECG measurements in small-size wearable healthcare system. In this paper, the designed wearable healthcare system utilizes a unique algorithm based quadratic variation to remove the baseline wander of ECG. This algorithm is able to remove the baseline wander without depending on the reliability value of the selected fiducial points. The experiment results shows that the ECG signal filtered by quadratic variation filter recovers from the distorted ECG signal efficiently.