Thousands of natural products have been identified from cultured microorganisms, yet evidence of their production in the environment has proven elusive. Technological advances in mass spectrometry, combined with public databases, now make it possible to address this disparity by detecting compounds directly from environmental samples. Here, we used adsorbent resins, tandem mass spectrometry, and next-generation sequencing to assess the metabolome of marine sediments and its relationship to bacterial community structure. We identified natural products previously reported from cultured bacteria, providing evidence they are produced in situ, and compounds of anthropogenic origin, suggesting this approach can be used as an indicator of environmental impact. The bacterial metabolite staurosporine was quantified and shown to reach physiologically relevant concentrations, indicating that it may influence sediment community structure. Staurosporine concentrations were correlated with the relative abundance of the staurosporine-producing bacterial genus Salinispora and production confirmed in strains cultured from the same location, providing a link between compound and candidate producer. Metagenomic analyses revealed numerous biosynthetic gene clusters related to indolocarbazole biosynthesis, providing evidence for noncanonical sources of staurosporine and a path forward to assess the relationships between natural products and the organisms that produce them. Untargeted environmental metabolomics circumvents the need for laboratory cultivation and represents a promising approach to understanding the functional roles of natural products in shaping microbial community structure in marine sediments.IMPORTANCE Natural products are readily isolated from cultured bacteria and exploited for useful purposes, including drug discovery. However, these compounds are rarely detected in the environments from which the bacteria are obtained, thus limiting our understanding of their ecological significance. Here, we used environmental metabolomics to directly assess chemical diversity in marine sediments. We identified numerous metabolites and, in one case, isolated strains of bacteria capable of producing one of the compounds detected. Coupling environmental metabolomics with community and metagenomic analyses provides opportunities to link compounds and producers and begin to assess the complex interactions mediated by specialized metabolites in marine sediments.