Previous studies have indicated an association between vitamin D and thyroid- and parathyroid-related diseases. However, it remains unclear whether it is a cause of the disease, a side effect of treatment or a consequence of the disease. The Mendelian randomisation (MR) study strengthens the causal inference by controlling for non-heritable environmental confounders and reverse causation. In this study, a two-sample bidirectional MR analysis was conducted to investigate the causal relationship between serum vitamin D levels and thyroid- and parathyroid-related diseases. Inverse variance weighted, weighted median and MR-Egger methods were performed, the Cochran Q test was used to evaluate the heterogeneity and the MR-PRESSO and MR-Egger intercepts were utilised to assess the possibility of pleiotropy. The Bonferroni-corrected significance threshold was 0·0038. At the Bonferroni-corrected significance level, we found that vitamin D levels suggestively decreased the risk of benign parathyroid adenoma (OR = 0·244; 95 % CI 0·074, 0·802; P = 0·0202) in the MR analyses. In the reverse MR study, a genetically predicted risk of thyroid cancer suggestively increased the risk of elevated vitamin D (OR = 1·007; 95 % CI 1·010, 1·013; P = 0·0284), chronic thyroiditis significantly increased the risk of elevated vitamin D (OR = 1·007; 95 % CI 1·002, 1·011; P = 0·0030) and thyroid nodules was significantly decreased the vitamin D levels (OR = 0·991; 95 % CI 0·985, 0·997; P = 0·0034). The findings might be less susceptible to horizontal pleiotropy and heterogeneity (P > 0·05). This study from a gene perspective indicated that chronic thyroiditis and thyroid nodules may impact vitamin D levels, but the underlying mechanisms require further investigation.