Advances in therapeutic neuromodulation devices have enabled concurrent stimulation and electrophysiology in the central nervous system. However, stimulation artifacts often obscure the sensed underlying neural activity. Here, we develop a method, termed Period-based Artifact Reconstruction and Removal Method (PARRM), to remove stimulation artifacts from neural recordings by leveraging the exact period of stimulation to construct and subtract a high-fidelity template of the artifact. Benchtop saline experiments, computational simulations, five unique in vivo paradigms across animal and human studies, and an obscured movement biomarker are used for validation. Performance is found to exceed that of state-of-the-art filters in recovering complex signals without introducing contamination. PARRM has several advantages: (1) it is superior in signal recovery; (2) it is easily adaptable to several neurostimulation paradigms; and (3) it has low complexity for future on-device implementation. Real-time artifact removal via PARRM will enable unbiased exploration and detection of neural biomarkers to enhance efficacy of closed-loop therapies.