Microbial communities are essential to the function of virtually all ecosystems and eukaryotes, including humans. However, it is still a major challenge to identify microbial cells active under natural conditions in complex systems. In this study, we developed a new method to identify and sort active microbes on the single-cell level in complex samples using stable isotope probing with heavy water (D2O) combined with Raman microspectroscopy. Incorporation of D2O-derived D into the biomass of autotrophic and heterotrophic bacteria and archaea could be unambiguously detected via C-D signature peaks in single-cell Raman spectra, and the obtained labeling pattern was confirmed by nanoscale-resolution secondary ion MS. In fast-growing Escherichia coli cells, label detection was already possible after 20 min. For functional analyses of microbial communities, the detection of D incorporation from D2O in individual microbial cells via Raman microspectroscopy can be directly combined with FISH for the identification of active microbes. Applying this approach to mouse cecal microbiota revealed that the host-compound foragers Akkermansia muciniphila and Bacteroides acidifaciens exhibited distinctive response patterns to amendments of mucin and sugars. By Raman-based cell sorting of active (deuterated) cells with optical tweezers and subsequent multiple displacement amplification and DNA sequencing, novel cecal microbes stimulated by mucin and/or glucosamine were identified, demonstrating the potential of the nondestructive D2O-Raman approach for targeted sorting of microbial cells with defined functional properties for single-cell genomics.