The present study aimed to investigate the antitumor effects of an intratumoral injection of dendritic cells (DCs) overexpressing interleukin-12 (IL-12) on melanoma. DCs, isolated from mouse spleen, were gene-modified using an IL-12 overexpression vector. Melanoma B6 cells were injected into C57BL/6 mice to generate tumors. Thereafter, DCs overexpressing IL-12 were injected into the tumors, and tumor volume was subsequently measured. Pathological changes in tumor tissue were detected by hematoxylin and eosin staining. The expression of interleukin-4 (IL-4) and IL-12 in tumors was measured by enzyme-linked immunosorbent assay, real-time PCR and western blotting. DCs were successfully isolated and a lentivirus vector expressing IL-12 was constructed. After intratumoral injection of phosphate-buffered saline (control group), tumor cells exhibited malignant growth; whereas tumors injected with DCs (DC group) or DCs + empty vector (DC + vector group) exhibited a small amount of inflammatory cell infiltration and limited areas of tissue necrosis. In contrast, tumors injected with DCs overexpressing IL-12 (DC + IL-12 group) displayed severe tissue necrosis, loss of cell structure, and inflammatory cell infiltration. Compared with the control group, the tumor volumes were significantly lower in the DC, the DC + vector and the DC + IL-12 groups, while the expression of IL-12 and IL-4 in the tumors was significantly higher. Importantly, the most marked changes in tumor volume and IL-12 and IL-4 expression were in the DC + IL-12 group, which were significantly greater than those in tumors treated with unmodified DCs. Hence, intratumoral injection of DCs overexpressing IL-12 exerted strong antitumor effects in melanoma, and biotherapy with DCs overexpressing IL-12 is a potential treatment strategy for melanoma.