Tripartite motif protein 22 (TRIM22) is a novel interferon-induced protein that potently inhibits the replication of evolutionarily diverse viruses, including HIV-1. Altered TRIM22 expression is also associated with diseases, such as multiple sclerosis, cancer, and autoimmunity. The factors that influence TRIM22 expression and antiviral activity are largely unknown. In this study, we adopted an evolution-guided functional approach to identify potential genetic determinants of TRIM22 function. Evolutionary analysis of TRIM22 from mammals spanning >100 million years demonstrated that TRIM22 evolution has been shaped by ancient and variable positive selection. We showed that positive selection is operating on multiple TRIM22 residues that cluster in putative functional regions and that some are predicted to be functionally damaging. Interestingly, the second most prevalent TRIM22 SNP in humans (rs1063303) is located at one of these positively selected sites. We showed that the frequency of rs1063303:G>C varies up to 10-fold between ethnicities and that in some ethnicities SNP rs1063303:G>C is being actively maintained in the population. The SNP rs1063303:G>C variant also had an inverse functional impact where it increased TRIM22 expression and decreased the antiviral activity of TRIM22. Taken together, our data characterize the extensive genetic variation in TRIM22 and identify rs1063303:G>C as a highly prevalent SNP that influences its function.