The mitochondrial DNA (mtDNA) can trigger immune responses and directly entrap pathogens, but it is not known to encode for active immune factors. The immune system is traditionally thought to be exclusively nuclear-encoded. Here, we report the identification of a mitochondrial-encoded host defense peptide (HDP) that presumably derives from the primordial proto-mitochondrial bacteria. We demonstrate that MOTS-c (mitochondrial open reading frame from the twelve S rRNA type-c) is a mitochondrial-encoded amphipathic and cationic peptide with direct antibacterial and immunomodulatory functions, consistent with the peptide chemistry and functions of known HDPs. MOTS-c targeted E. coli and methicillin-resistant S. aureus (MRSA), in part, by targeting their membranes using its hydrophobic and cationic domains. In monocytes, IFNγ, LPS, and differentiation signals each induced the expression of endogenous MOTS-c. Notably, MOTS-c translocated to the nucleus to regulate gene expression during monocyte differentiation and programmed them into macrophages with unique transcriptomic signatures related to antigen presentation and IFN signaling. MOTS-c-programmed macrophages exhibited enhanced bacterial clearance and shifted metabolism. Our findings support MOTS-c as a first-in-class mitochondrial-encoded HDP and indicates that our immune system is not only encoded by the nuclear genome, but also by the co-evolved mitochondrial genome.