Human papillomavirus (HPV) has been implicated in various cancers, including those affecting the skin. The study assessed the long-term risk of skin cancer associated with HPV infection in Taiwan region, using data from the National Health Insurance Research Database between 2007 and 2015. Our analysis revealed a significant increase in skin cancer risk among those with HPV, particularly for squamous cell carcinoma (SCC), the subtype with the highest observed adjusted hazard ratio (aHR) = 5.97, 95% CI: 4.96–7.19). The overall aHR for HPV-related skin cancer was 5.22 (95% CI: 4.70–5.80), indicating a notably higher risk in the HPV-positive group. The risk of skin cancer was further stratified by type, with basal cell carcinoma (aHR = 4.88, 95% CI: 4.14–5.74), and melanoma (aHR = 4.36, 95% CI: 2.76–6.89) also showing significant associations with HPV. The study also highlighted regional variations, with increased risks in southern Taiwan and the Kaohsiung-Pingtung area. Key findings emphasize the importance of sun protection, particularly in regions of high UV exposure and among individuals in high-risk occupations. This research contributes to a better understanding of the complex interactions between HPV and skin cancer risk, reinforcing the importance of preventive strategies in public health.