Microbial systems often exhibit staggering diversity, making the study of rare, interesting species challenging. For example, metagenomic analyses of mixed-cell populations are often dominated by the sequences of the most abundant organisms, while those of rare microbes are detected only at low levels, if at all. To overcome this, selective cultivation or fluorescence-activated cell sorting (FACS) can be used to enrich for the target species prior to sequence analysis; however, since most microbes cannot be grown in the lab, cultivation strategies often fail, while cell sorting requires techniques to uniquely label the cell type of interest, which is often not possible with uncultivable microbes. Here, we introduce a culture-independent strategy for sorting microbial cells based on genomic content, which we term PCR-activated cell sorting (PACS). This technology, which utilizes the power of droplet-based microfluidics, is similar to FACS in that it uses a fluorescent signal to uniquely identify and sort target species. However, PACS differs importantly from FACS in that the signal is generated by performing PCR assays on the cells in microfluidic droplets, allowing target cells to be identified with high specificity with suitable design of PCR primers and TaqMan probes. The PACS assay is general, requires minimal optimization and, unlike antibody methods, can be developed without access to microbial antigens. Compared to non-specific methods in which cells are sorted based on size, granularity, or the ability to take up dye, PACS enables genetic sequence-specific sorting and recovery of the cell genomes. In addition to sorting microbes, PACS can be applied to eukaryotic cells, viruses, and naked nucleic acids.