Restriction factor sequences have changed through primate evolution, suggesting an ongoing battle between retroviruses and their hosts as described by the Red Queen hypothesis. One of these mechanisms utilises intracellular antiviral molecules referred to as restriction factors. Retroviruses have constantly been infecting mammals throughout their evolution, causing them to evolve defensive mechanisms to protect themselves. Our results suggest that lentiviruses may have been important pathogens in Asian macaques despite the fact that there are no reported lentiviral infections in current macaque populations. We reveal how specificity is altered by a scaffold mutation, E143K, that modifies surface electrostatics and propagates conformational changes into the active site. Subsequent mutations have enhanced restriction to particular viruses but at the cost of broad specificity. Structural, thermodynamic and viral restriction analysis suggests that a single mutation in the Cyp domain, R69H, occurred early in macaque TRIMCyp evolution, expanding restriction specificity to the lentiviral lineages found in African green monkeys, sooty mangabeys and chimpanzees. Here we provide evidence that Asian macaque TRIMCyps have acquired changes that switch restriction specificity between different lentiviral lineages, resulting in species-specific alleles that target different viruses. All TRIMCyps comprise a CypA domain fused to the tripartite domains of TRIM5α but they have distinct lentiviral specificities, conferring HIV-1 restriction in New World owl monkeys and HIV-2 restriction in Old World rhesus macaques. TRIMCyps are anti-retroviral proteins that have arisen independently in New World and Old World primates.