Melanoma is one of the most fatal and therapy-resistant types of cancer; therefore, identifying novel therapeutic candidates to improve patient survival is an ongoing effort. Previous studies have revealed that pimozide is not sufficient to treat melanoma; therefore, enhancing the treatment is necessary. Indoleamine 2, 3‑dioxygenase (IDO) is an immunosuppressive, intracellular rate-limiting enzyme, which contributes to immune tolerance in various tumours, including melanoma, and inhibition of IDO may be considered a novel therapeutic strategy when combined with pimozide. The present study aimed to assess the antitumour activities of pimozide in vitro, and to investigate the effects of pimozide combined with L‑methyl-tryptophan (L‑MT) in vivo. For in vitro analyses, the B16 melanoma cell line was used. Cell cytotoxicity assay, cell viability assay, wound‑healing assay and western blotting were conducted to analyse the effects of pimozide on B16 cells. Furthermore, B16 cell-bearing mice were established as the animal model. Haematoxylin and eosin staining, immunohistochemistry, terminal deoxynucleotidyl transferase dUTP nick end-labelling staining, western blotting and flow cytometry were performed to determine the effects of monotherapy and pimozide and L‑MT cotreatment on melanoma. The results demonstrated that pimozide exhibited potent antitumour activity via the regulation of proliferation, apoptosis and migration. Furthermore, the antitumour effects of pimozide were enhanced when combined with L‑MT, not only via regulation of proliferation, apoptosis and migration, but also via immune modulation. Notably, pimozide may regulate tumour immunity through inhibiting the activities of signal transducer and activator of transcription (Stat)3 and Stat5. In conclusion, the present study proposed the use of pimozide in combination with the IDO inhibitor, L‑MT, as a potential novel therapeutic strategy for the treatment of melanoma.