The present invention is directed to a method for preventing and/or treating melanoma such as superficial spreading melanoma, nodular melanoma, lentigo maligna melanoma, and acral lentiginous melanoma. The method comprises administering to a subject in need thereof an effective amount of dapansutrile. The method optionally comprising co-administering anti-PD-1 antibody with dapansutrile. A preferred route of administration is oral administration.