This study aimed to investigate the relationship between statin (lipophilic statin and hydrophilic statin) exposure and the risk of skin cancer. The incidence of skin cancer under statin exposure was used as the primary outcome, and the relevant studies were screened from Web of Science, PubMed, Cochrane Library, and EBSCO electronic database until September 2022. Ten observational studies and two randomized controlled trials (RCTs) were included. The statistical results indicated that in lipophilic statins, the exposed group had a higher risk of skin cancer than the non-exposed group (OR: 1.09, P = 0.003). However, compared with the non-exposed group, there was no significant difference between hydrophilic statins exposure and the incidence of skin cancer (OR: 1.02, P = 0.341). Further subgroup analysis of the subtypes of statins revealed that compared with the non-exposed group, exposure to lovastatin (OR: 1.18, P = 0.048) or simvastatin (OR: 1.11, P < 0.001) was a risk factor for skin cancer. Besides, subgroup analysis based on the subtypes of skin cancer demonstrated that the risks of melanoma (OR: 1.13, P = 0.009), basal cell carcinoma (BCC) (OR: 1.05, P = 0.036), and squamous cell carcinoma (SCC) (OR: 1.13, P = 0.026) under lipophilic statin exposure were significantly higher than those in the non-exposed group. On the contrary, compared with the non-exposed group, the risk of BCC was significantly reduced under the exposure of hydrophilic statins (OR: 0.93, P = 0.031). This study showed that the relationship between statin exposure and skin cancer risk was affected by the subtypes of statins and skin cancer subtypes.