Data in terms of how active vitamin D supplementation affects muscle mass and function in end-stage renal disease (ESRD) patients has led to inconclusive results. The main goal of this research was to examine the association of active vitamin D supplementation and risk of the deterioration of muscle mass and function among ESRD patients on peritoneal dialysis (PD). Eligible ESRD patients on PD were prospectively included, and followed up at 3-month intervals in the tertiary care center. Based on the medications during the 12-month follow-up period, the patients were divided into two groups (vitamin D users and non-users). The deterioration of muscle mass and function was identified utilizing the criteria set by the Asian Working Group on Sarcopenia in 2019 (AWGS 2019). Primary outcome was defined as the deterioration of muscle mass and function at the end of the 12-month follow-up. The absolute diffecence and 95% confidence interval (CI) of the incidence of deterioration between vitamin D users and non-users was estimated. The association of vitamin D supplementation with risk of the deterioration of muscle mass and function during the 12-month follow-up period, was examined by employing multivariate logistic regression models. A total of 229 incident PD patients (6 of whom were lost in follow-up) were included. During the entire study period, 54.7% (122/223) of the remaining patients were considered users of oral active vitamin D. The incidence of deterioration in muscle mass and function was 30.5% (68/223) throughout the entire follow-up. In this regard, the rate was 23.0% (28/122) that received oral active vitamin D, while it was 39.6% (40/101) in the group that did not receive it, with an absolute diffecence of -16.6% (95% CI − 4.5, − 28.7) and an estimated relative risk (RR) of 0.784 (95% CI 0.651–0.943). After adjustment for potential confounding factors in logistic regression model, vitamin D users group was still associated with decreased risk of the deterioration of muscle mass and function (OR 0.330, 95% CI 0.159–0.683, P = 0.003). In secondary analysis, the relationship between oral active vitamin D and the deterioration of muscle mass and function remained consistent (≤ 0.25 µg per day vs. non-users; OR 0.300, 95% CI 0.131–0.688, P = 0.004); however, no significant relationship was identified in patients receiving a mean daily dose of > 0.25 µg compared with non-users (OR 0.389, 95% CI 0.146–1.034, P = 0.058). These results indicate that active vitamin D supplementation was significantly associated with a decreased risk of the deterioration of muscle mass and function in incident PD patients with ESRD. However, the amount and type of vitamin D used and the duration of the intervention warrant further randomized controlled trials to confirm the possibility that such medication improves sarcopenia in ESRD patients.