Sites of biologically interesting selection are identified by comparing observed evolutionary patterns to those expected under a null model for evolution in the absence of such selection. For protein-coding genes, the most common null model is that nonsynonymous and synonymous mutations fix at equal rates; this unrealistic model has limited power to detect interesting selection. I describe a new approach that uses a null model based on high-throughput measurements of a gene’s site-specific amino-acid preferences. This null model makes it possible to identify diversifying selection for amino-acid change and differential selection for mutations to unexpected amino acids. I show that this approach identifies sites of adaptive substitutions in four genes (lactamase, Gal4, influenza nucleoprotein, and influenza hemagglutinin) far better than traditional methods. As rapid increases in biological data enable increasingly nuanced descriptions of the constraints on individual sites, approaches like the one here can greatly improve our ability to identify biologically interesting selection.