The acquisition of genes by horizontal transfer can impart entirely new biological functions and provide an important route to major evolutionary innovation. Here we have used ancient gene reconstruction and functional assays to investigate the impact of a single horizontally transferred nucleotide transporter into the common ancestor of the Microsporidia, a major radiation of intracellular parasites of animals and humans. We show that this transporter provided early microsporidians with the ability to steal host ATP and to become energy parasites. Gene duplication enabled the diversification of nucleotide transporter function to transport new substrates, including GTP and NAD+, and to evolve the proton-energized net import of nucleotides for nucleic acid biosynthesis, growth and replication. These innovations have allowed the loss of pathways for mitochondrial and cytosolic energy generation and nucleotide biosynthesis that are otherwise essential for free-living eukaryotes, resulting in the highly unusual and reduced cells and genomes of contemporary Microsporidia.