Parkinson's disease (PD) is a neurodegenerative disease with movement disorder. PD is characterized by the loss of dopaminergic (DA) neurons in the substantia nigra. Cordycepin, a small molecule extracted from cordyceps sinensis, has neuroprotective, anti-inflammatory, antioxidant and anti-tumor properties. In this study, we explored its possible beneficial effects on PD. PD rat models and cell models were established via 1-me-thyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) injection and LPS treatment respectively, and cordycepin was administered. The motor functions of rats were examined, and the tyrosine hydroxylase (TH)-positive DA neurons and Iba1-positive microglia were detected by immunohistochemical and immunofluorescence staining. The expression levels of inflammatory and oxidative stress-related factors were also measured in vivo and in vitro. In addition, the TLR/NF-kappa B pathway was investigated to explore the mechanism. We found that in vivo, MPTP injection introduced motor disorders, the loss of DA neurons and the activation of TLR/NF-kappa B signaling pathway. Cordycepin treatment alleviated these MPTP-induced changes. In vitro, the results were confirmed in Lipopolysaccharide (LPS)-induced cells. Moreover, cordycepin mitigated the cytotoxic effects on PC12 cells produced by microglia. In conclusion, cordycepin alleviated PD symptoms by inhibiting TLR/NF-kappa B signaling pathway in vivo and in vitro.