The molecular basis for adaptations to extreme environments can now be understood by interrogating the ever-increasing number of sequenced genomes. Mammals such as cetaceans, bats, and highland species can protect themselves from oxidative stress, a disruption in the balance of reactive oxygen species, which results in oxidative injury and cell damage. Here, we consider the evolution of the glutathione peroxidase (GPX) family of antioxidant enzymes by interrogating publicly available genome data from 70 mammalian species from all major clades. We identified 8 GPX subclasses ubiquitous to all mammalian groups. Mammalian GPX gene families resolved into the GPX4/7/8 and GPX1/2/3/5/6 groups and are characterized by several instances of gene duplication and loss, indicating a dynamic process of gene birth and death in mammals. Seven of the eight GPX subfamilies (all but GPX7) were under positive selection, with the residues under selection located at or close to active sites or at the dimer interface. We also reveal evidence of a correlation between ecological niches (e.g. high oxidative stress) and the divergent selection and gene copy number of GPX subclasses. Notably, a convergent expansion of GPX1 was observed in several independent lineages of mammals under oxidative stress and may be important for avoiding oxidative damage. Collectively, this study suggests that the GPX gene family has shaped the adaption of mammals to stressful environments.