Increasing evidence suggests the heterogeneity of macrophage phenotype and function ultimately determines the outcome of diabetic nephropathy (DN). This study aimed to investigate the effects of vitamin D on macrophage M1/M2 phenotype and its role in preventing podocyte impairment in streptozotocin-induced DN rats. Calcitriol, a bioactive 1,25-dihydroxyvitamin D3, ameliorated proteinuria and renal damage as well as reversed the decline of both nephrin and podocin, crucial structural proteins in podocytes. DN rats showed increased infiltrating macrophages with M1 phenotype characterized by elevated expression of inducible nitric oxide synthase and TNF-α in glomeruli and interstitium, which were inhibited after calcitriol treatment. Interestingly, calcitriol promoted M2 macrophage activation with enhanced expression of CD163, arginase-1, and mannose receptor at week 18 but not at week 8 or 14. The ratio of CD163 to CD68, considered as the proportion of M2 macrophages, was about 2.9-fold higher at week 18 after calcitriol treatment. Furthermore, the protein expression of inducible nitric oxide synthase, a crucial marker of M1 macrophages, was negatively correlated with the expression of either nephrin or podocin, whereas CD163, indicating M2 macrophages, was positively correlated. In vitro, 1,25-dihydroxyvitamin D3 switched high-glucose-induced M1 macrophages toward an M2 phenotype in either U937-derived macrophages or RAW264.7 cells. Our results suggest that vitamin D not only reduces macrophage infiltration and inhibits M1 macrophage activation but also enhances M2 macrophage phenotype to protect against podocyte injury.