Skin cancer is the most common cancer in the United States, while DNA-damaging ultraviolet B (UVB) radiation from the sun remains the major environmental risk factor. Reducing skin cancer incidence is becoming an urgent issue. The energy-sensing enzyme 5'-AMP-activated protein kinase (AMPK) has a key role in the regulation of cellular lipid and protein metabolism in response to stimuli such as exercise and changes in fuel availability. However, the role of AMPK in the response of skin cells to UVB damage and in skin cancer prevention remains unknown. Here we show that AMPK activation is reduced in human and mouse squamous cell carcinoma as compared with normal skin, and by UVB irradiation, suggesting that AMPK is a tumor suppressor. At the molecular level, AMPK deletion reduced the expression of the DNA repair protein xeroderma pigmentosum C (XPC) and UVB-induced DNA repair. AMPK activation by its activators AICAR (5-aminoimidazole-4-carboxamide ribonucleoside) and metformin (N',N'-dimethylbiguanide), the most widely used antidiabetic drug, increased the expression of XPC and UVB-induced DNA repair in mouse skin, normal human epidermal keratinocytes, and AMPK wild-type (WT) cells but not in AMPK-deficient cells, indicating an AMPK-dependent mechanism. Topical treatment with AICAR and metformin not only delayed onset of UVB-induced skin tumorigenesis but also reduced tumor multiplicity. Furthermore, AMPK deletion increased extracellular signal-regulated kinase (ERK) activation and cell proliferation, whereas AICAR and metformin inhibited ERK activation and cell proliferation in keratinocytes, mouse skin, AMPK WT and AMPK-deficient cells, suggesting an AMPK-independent mechanism. Finally, in UVB-damaged tumor-bearing mice, both topical and systemic metformin prevented the formation of new tumors and suppressed growth of established tumors. Our findings not only suggest that AMPK is a tumor suppressor in the skin by promoting DNA repair and controlling cell proliferation, but also demonstrate previously unknown mechanisms by which the AMPK activators prevent UVB-induced skin tumorigenesis.