Observational and epidemiological studies show conflicting results on the relationship between atopic dermatitis and skin cancer. Additionally, observational studies are susceptible to the reverse causation and confounders, thus, may not interpret true causal relationships. The causal effects of atopic dermatitis on the risk of skin cancers remains unclear. To investigate the causal relationship between atopic dermatitis and skin cancer including cutaneous malignant melanoma, cutaneous squamous cell carcinoma, basal cell carcinoma and actinic keratosis. We performed a two-sample Mendelian randomization analysis based on summary datasets of public genome-wide association studies of European ancestry. The inverse variance-weighted approach was applied as the main analysis. MR-Egger and weighted median methods were used to complement the inverse variance-weighted results. A series of sensitivity analyses were used to ensure the robustness of the causality estimates. Inverse variance-weighted method showed that genetically predicted dermatitis patients were significantly associated with an increased incidence of basal cell carcinoma (OR, 1.20; 95% CI, 1.10-1.31; p = 4.07E-05) and cutaneous squamous cell carcinoma (OR, 1.14; 95% CI, 1.10-1.19; p = 1.05E-11). However, we did not find a significant causality for atopic dermatitis on melanoma neither did we find actinic keratosis. Subsequent sensitive analyses supported these results. Our study identified the causality between atopic dermatitis basal cell carcinoma and squamous cell carcinoma. Accordingly, regular skin cancer screening is recommended for patients with atopic dermatitis.