Existing studies investigating the impact of serum calcium (Ca), phosphate (P), 25 hydroxyvitamin D (25[OH]D), and parathyroid hormone (PTH) levels on kidney function have produced inconsistent results. Further research is needed to establish the direct causal relationship between these factors and kidney function. The study used genome-wide association study datasets for exposure and outcome, mainly derived from the UK Biobank and CKDGen Consortium, with sample sizes ranging from 3,310 to 480,699 individuals of European ancestry. Heritability and genetic correlations among these phenotypes were assessed using linkage disequilibrium score regression (LDSC) and phenotypes with a heritability z-score <4 were excluded from further analyses. Pleiotropic analyses were performed to identify potential horizontal pleiotropic variants at gene and LD-independent locus levels. Mendelian randomization (MR) analysis, using instrumental variables (IVs) based on two distinct selection criteria, was conducted to investigate the potential causal relationships between serum Ca, P, 25(OH)D, PTH, and kidney function. PTH was excluded from further analysis due to a heritability z-score < 4. Genetic correlations were observed between serum Ca and urine albumin-to-creatinine ratio (UACR) (rg = 0.202, P-value = 5.0E-04), between serum 25(OH)D and estimated glomerular filtration rate using serum creatinine (eGFRcrea) (rg = -0.094; P-value = 1.4E-05), and between serum 25(OH)D and blood urea nitrogen (BUN) (rg = 0.127; P-value = 1.7E-06). In univariable MR analysis using IVs based on two different selection criteria, it consistently demonstrated that genetically predicted serum Ca consistently showed an increase in UACR (beta 0.11, P-value 2.0E-03; beta 0.13, P-value 2.0E-04). Similarly, serum P was associated with a decrease in eGFRcrea (beta -0.01, P-value 2.0E-04; beta -0.005, P-value 2.0E-03) and an increase in BUN (beta 0.02, P-value 3.0E-03; beta 0.02, P-value 7.5E-07). The influence of serum P on kidney function was further supported in multivariable MR analysis. However, genetically predicted 25(OH)D did not have a significant impact on kidney function. Elevated serum Ca or P levels could both impair kidney function, whereas 25(OH)D has no impact on renal function.