Vemurafenib has been used as first-line therapy for unresectable or metastatic melanoma with BRAFV600E mutation. However, overall survival is still limited due to treatment resistance after about one year. Therefore, identifying new therapeutic targets for melanoma is crucial for improving clinical outcomes. In the present study, we found that lowering intracellular cholesterol by knocking down DHCR24, the limiting synthetase, impaired tumor cell proliferation and migration and abrogated the ability to xenotransplant tumors. More importantly, administration of DHCR24 or cholesterol mediated resistance to vemurafenib and promoted the growth of melanoma spheroids. Mechanistically, we identified that 27-hydroxycholesterol (27HC), a primary metabolite of cholesterol synthesized by the enzyme cytochrome P450 27A1 (CYP27A1), reproduces the phenotypes induced by DHCR24 or cholesterol administration and activates Rap1-PI3K/AKT signaling. Accordingly, CYP27A1 is highly expressed in melanoma patients and upregulated by DHCR24 induction. Dafadine-A, a CYP27A1 inhibitor, attenuates cholesterol-induced growth of melanoma spheroids and abrogates the resistance property of vemurafenib-resistant melanoma cells. Finally, we confirmed that the effects of cholesterol on melanoma resistance require its metabolite 27HC through CYP27A1 catalysis, and that 27HC further upregulates Rap1A/Rap1B expression and increases AKT phosphorylation. Thus, our results suggest that targeting 27HC may be a useful strategy to overcome treatment resistance in metastatic melanoma.