Deciphering the immune organization of eukaryotes is important for human health and for understanding ecosystems. The recent discovery of antiphage systems revealed that various eukaryotic immune proteins originate from prokaryotic antiphage systems. However, whether bacterial antiphage proteins can illuminate immune organization in eukaryotes remains unexplored. Here, we use a phylogeny-driven approach to uncover eukaryotic immune proteins by searching for homologs of bacterial antiphage systems. We demonstrate that proteins displaying sequence similarity with recently discovered antiphage systems are widespread in eukaryotes and maintain a role in human immunity. Two eukaryotic proteins of the anti-transposon piRNA pathway are evolutionarily linked to the antiphage system Mokosh. Additionally, human GTPases of immunity-associated proteins (GIMAPs) as well as two genes encoded in microsynteny, FHAD1 and CTRC, are respectively related to the Eleos and Lamassu prokaryotic systems and exhibit antiviral activity. Our work illustrates how comparative genomics of immune mechanisms can uncover defense genes in eukaryotes.