A method and corresponding apparatus employ a time-varying spectral analysis approach for reconstructing an electrocardiogram (ECG) signal that includes motion artifacts. The motion artifacts are produced by motion of an ECG sensor relative to a sensing location. The time-varying spectral analysis based approach enables the ECG signal to be reconstructed with accuracy by suppressing the motion artifacts. Example applications for the method and corresponding apparatus include ECG-based heart rate monitoring in wearable devices for fitness tracking and health monitoring even during intense physical activities.