Lateral gene transfer events between bacteria and animals highlight an avenue for evolutionary genomic loss/gain of function. Herein, we report functional lateral gene transfer in animal parasitic nematodes. Members of the Nematoda are heme auxotrophs, lacking the ability to synthesize heme; however, the human filarial parasite Brugia malayi has acquired a bacterial gene encoding ferrochelatase (BmFeCH), the terminal step in heme biosynthesis. BmFeCH, encoded by a 9-exon gene, is a mitochondrial-targeted, functional ferrochelatase based on enzyme assays, complementation, and inhibitor studies. Homologs have been identified in several filariae and a nonfilarial nematode. RNAi and ex vivo inhibitor experiments indicate that BmFeCH is essential for viability, validating it as a potential target for filariasis control.