Bacterial secondary metabolites are structurally diverse molecules that drive microbial interaction by altering growth, cell differentiation, and signaling. Bacillus subtilis, a Gram-positive soil-dwelling bacterium, produces a wealth of secondary metabolites, among them, lipopeptides have been vastly studied by their antimicrobial, antitumor, and surfactant activities. However, the natural functions of secondary metabolites in the lifestyles of the producing organism remain less explored under natural conditions, i.e. in soil. Here, we describe a hydrogel-based transparent soil system to investigate B. subtilis chemical ecology under controllable soil-like conditions. The transparent soil matrix allows the growth of B. subtilis and other isolates gnotobiotically and under nutrient-controlled conditions. Additionally, we show that transparent soil allows the detection of lipopeptides production and dynamics by HPLC-MS and MALDI-MS imaging, along with fluorescence imaging of 3-dimensional bacterial assemblages. We anticipate that this affordable and highly controllable system will promote bacterial chemical ecology research and help to elucidate microbial interactions driven by secondary metabolites.