There is an urgent need for affinity reagents that target phospho-modified sites on individual proteins; however, generating such reagents remains a significant challenge. Here, we describe a genetic selection strategy for routine laboratory isolation of phospho-specific designed ankyrin repeat proteins (DARPins) by linking in vivo affinity capture of a phosphorylated target protein with antibiotic resistance of Escherichia coli cells. The assay is validated using an existing panel of DARPins that selectively bind the nonphosphorylated (inactive) form of extracellular signal-regulated kinase 2 (ERK2) or its doubly phosphorylated (active) form (pERK2). We then use the selection to affinity-mature a phospho-specific DARPin without compromising its selectivity for pERK2 over ERK2 and to reprogram the substrate specificity of the same DARPin towards non-cognate ERK2. Collectively, these results establish our genetic selection as a useful and potentially generalizable protein engineering tool for studying phospho-specific binding proteins and customizing their affinity and selectivity.