Antigen-presenting dendritic cells (DCs) trigger the activation of cytotoxic CD8 T cells that target and eliminate cells with the antigen on their surface. Although DCs usually pick up and process antigens themselves, they can also receive peptide antigens from other cells via gap junctions. We demonstrate here that infection with Salmonella can induce, in both human and murine melanoma cells, the up-regulation of connexin 43 (Cx43), a ubiquitous protein that forms gap junctions and that is normally lost during melanoma progression. Bacteria-treated melanoma cells can establish functional gap junctions with adjacent DCs. After bacterial infection, these gap junctions transferred preprocessed antigenic peptides from the tumor cells to the DCs, which then presented those peptides on their surface. These peptides activated cytotoxic T cells against the tumor antigen, which could control the growth of distant uninfected tumors. Melanoma cells in which Cx43 had been silenced, when infected in vivo with bacteria, failed to elicit a cytotoxic antitumor response, indicating that this Cx43 mechanism is the principal one used in vivo for the generation of antitumor responses. The Cx43-dependent cross-presentation pathway is more effective than standard protocols of DC loading (peptide, tumor lysates, or apoptotic bodies) for generating DC-based tumor vaccines that both inhibit existing tumors and prevent tumor establishment. In conclusion, we exploited an antimicrobial response present in tumor cells to activate cytotoxic CD8 T cells specific for tumor-generated peptides that could directly recognize and kill tumor cells.