Gut microbiota are suggested to be associated with a variety of cancers.However, the correlation between gut microbiota and the development of malignant non-melanoma skin cancer (MNMSC) remains unknown. Thus, this study employed a bidirectional Mendelian randomisation (MR) method to investigate the potentially causal association between gut microbiota and MNMSC. Here the detailed genetic data on the gut microbiota available from the MiBioGen consortium and the Dutch Microbiota Project were analysed, as well as the MNMSC data from the UK Biobank.Several sophisticated statistical methods involving inverse variance weighting, weighted median estimator, MR Egger, and simple and weighted mode-based estimator models were utilised to assess the potential association between gut microbiota and MNMSC. Reverse MR and sensitivity analyses were also performed. Eight gut microbiota were identified as potentially causally related to MNMSC. Genera Holdemanella (odds ratio [OR]=0.99, 95% confidence interval [CI]: 0.99–1.00, 4.5×10-3), Ruminococcaceae UCG014 (OR=0.99, 95% CI: 0.99–1.00, P=1.3×10-2), and Sutterella (OR=0.99, 95% CI: 0.99–1.00, P=4.2×10-2), Bifidobacterium adolescentis (OR=0.99, 95% CI: 0.99–1.00, P=8.8×10-3), Bacteroides dorei (OR=1.00, 95% CI: 0.99–1.00, P=9.9×10-3), and the family Veillonellaceae (OR=0.99, 95% CI: 0.99–1.00,P=3.8×10-4) were negatively correlated with MNMSC. Clostridia (OR=1.01, 95% CI: 1.00–1.02, P=2.1×10-3) and Clostridiales (OR=1.01, 95% CI: 1.00–1.02, P=2.1×10-3) were positively associated with MNMSC. The inverse association between MNMSC and Veillonellaceae was more pronounced following Bonferroni correction. No causal relationship was determined between MNMSC and any of these eight gut microbiota by reverse MR analysis. This study suggests that specific gut microbiota have potential causal effects on MNMSC. This study indicates that certain gut microbiota may have a causal effect on MNMSC. Thus, gut microbiota modulation may be a potential means to prevent MNMSC.