Testosterone deficiency might be associated with vitamin D levels in hypogonadal men, but it is not clear whether testosterone can affect vitamin D and fibroblast growth factor-23 (FGF23), either directly or indirectly via aromatization to estradiol. We aimed to investigate the role of testosterone on vitamin D metabolism and serum FGF23 in male rats. A total of 48 male rats were divided into 4 equal groups: sham; O, orchiectomy; O + T, orchiectomized rats treated with testosterone; and O + T+L, orchiectomized rats treated with combination of testosterone and letrozole. We compare the vitamin D metabolism biochemical parameters in these four groups, before and after the study. We detected a significant reduction in 25-hydroxyvitamin D (25(OH)D), vitamin D binding protein (DBP), FGF23, and 1,25-dihydroxyvitamin D (1,25(OH)2D) serum level in O group compared to sham group (p = 0.004, p = 0.009, p < 0.001 and p < 0.001, respectively), and a significant increase in serum phosphorus, parathyroid hormone (PTH), and alkaline phosphatase (ALP) levels in orchiectomized rats in comparison to sham group (p < 0.001, p = 0.022, and p = 0.006, respectively). However, these changes were corrected by testosterone replacement in O + T and O + T+L groups. In addition, we found that DBP and 1,25(OH)2D serum levels were significantly higher in O + T group in comparison to O + T+L group (p = 0.030 and p = 0.026, respectively). Testosterone plays a significant role on regulating 25(OH)D, DBP, FGF23, phosphate (Phos), PTH, and 1,25(OH)2D serum levels in male rats. Also, testosterone has a potent effect on 1,25(OH)2D and DBP by its conversion to estradiol.