Many bacterial pathogens hijack macrophages to egress from the port of entry to the lymphatic drainage and/or bloodstream, causing dissemination of life-threatening infections. However, the underlying mechanisms are not well understood. Here, we report that Salmonella infection generates directional electric fields (EFs) in the follicle-associated epithelium of mouse cecum. In vitro application of an EF, mimicking the infection-generated electric field (IGEF), induces directional migration of primary mouse macrophages to the anode, which is reversed to the cathode upon Salmonella infection. This infection-dependent directional switch is independent of the Salmonella pathogenicity island 1 (SPI-1) type III secretion system. The switch is accompanied by a reduction of sialic acids on glycosylated surface components during phagocytosis of bacteria, which is absent in macrophages challenged by microspheres. Moreover, enzymatic cleavage of terminally exposed sialic acids reduces macrophage surface negativity and severely impairs directional migration of macrophages in response to an EF. Based on these findings, we propose that macrophages are attracted to the site of infection by a combination of chemotaxis and galvanotaxis; after phagocytosis of bacteria, surface electrical properties of the macrophage change, and galvanotaxis directs the cells away from the site of infection.