Diabetes, which is one of the most important health challenges for humankind, is associated with impaired glucose metabolism. Diabetes mellitus (DM) includes two major types of diabetes, type 1 (T1DM) and type 2 (T2DM). In this study, in the beginning, interventional and experimental studies were performed on 45 patients with T2DM, and the modulating effects of vitamin D were evaluated on the biochemical parameters of patients with the restricted diet, consuming metformin or insulin. With regard to our experimental results, the combination treatment of metformin/ vitamin D or insulin/ vitamin D can reduce the fasting blood sugar (FBS). A combination of vitamin D with insulin decreases the insulin resistance and raises the insulin sensitivity in patients with T2DM. The combination treatment of vitamin D and metformin led to a decrease in the level of mRNA of GLUT4, and also it's trafficking from the cytosol to the plasma membrane. At the second phase of the present study, molecular dynamics (MD), molecular docking, MM/PBSA, and QM/MM were occupied to examine the structural behavior of VDR, in the free or ligand bound state, during 50 ns. The MD results exhibited that in the presence of metformin, the flexibility of residues comprising helix 12 from vitamin D-bound VDR was decreased. In addition, metformin decreased the radius of gyration of agonist-bound VDR. In addition, QM/MM results showed that metformin diminished the binding free energy between VDR and vitamin D. Our computational data demonstrated that metformin, in the presence of vitamin D, reinforces the interaction between VDR and its co-activator protein.