Objective The causal relationship between common mineral nutrients and ankylosing spondylitis (AS) has not been studied. So this Mendelian randomization (MR) study aims to investigate the causal association of varying levels of calcium, zinc, copper, and selenium on AS. Design We selected 4 elements potentially associated with the onset and development of AS as exposure factors, single nucleotide polymorphisms (SNPs) as instrumental variables, and these SNPs are independent of each other(r(2) < 0.05) and highly correlated with each of the 4 elements (P < 5 x 10(-8)). The 2-sample MR method takes Inverse-variance weighted (IVW) and MR-Egger as the main method and Simple mode (SM), Weighted median (WM1), and Weighted mode (WM2) as supplementary methods to evaluate the causal effect of mineral levels on AS. Results The IVW analysis does not provide convincing evidence to support a causal association between calcium (odds ratio [OR] = 1.000, 95% CI = 0.994, 1.005, P = .875), copper (OR = 1.000, 95% CI = 1.000, 1.001, P = .533) and selenium (OR = 0.999, 95% CI = 0.998, 1.000, P = .229) and AS. The IVW (OR = 1.001, 95% CI = 1.000, 1.002, P = .029) and WM1 (OR = 1.001, 95% CI = 1.000, 1.002, P = .011) results of zinc show that per standard deviation increment in zinc is a suggestive association with risks of AS, and MR-Egger (OR = 1.004, 95% CI = 0.996, 1.013, P = .265) and other supplementary methods indicate that zinc is not causally associated with AS. All MR-Egger intercept parameters and MR Pleiotropy RESidual Sum and Outlier tests demonstrated the absence of horizontal pleiotropy. Conclusions This study does not provide convincing evidence to support a causal correlation between calcium, zinc, copper, and selenium with AS.