Background Bacillus subtilis is one of the most important microorganisms for recombinant protein production. It possesses the GRAS (generally recognized as safe) status and a potent protein secretion capacity. Secretory protein production greatly facilitates downstream processing and thus significantly reduces costs. However, not all heterologous proteins are secreted and intracellular production poses difficulties for quantification. To tackle this problem, we have established a so-called intracellular split GFP (iSplit GFP) assay in B. subtilis as a tool for the in vivo protein detection during expression in batch cultures and at a single-cell level. For the iSplit GFP assay, the eleventh β-sheet of sf GFP is fused to a target protein and can complement a detector protein consisting of the respective truncated sf GFP (GFP1-10) to form fluorescent holo-GFP. Results As proof of concept, the GFP11-tag was fused C-terminally to the E. coli β-glucuronidase GUS, resulting in fusion protein GUS11. Variable GUS and GUS11 production levels in B. subtilis were achieved by varying the ribosome binding site via spacers of increasing lengths (4–12 nucleotides) for the GUS-encoding gene. Differences in intracellular enzyme accumulation were determined by measuring the GUS11 enzymatic activity and subsequently by adding the detector protein to respective cell extracts. Moreover, the detector protein was co-produced with the GUS11 using a two-plasmid system, which enabled the in vivo detection and online monitoring of glucuronidase production. Using this system in combination with flow cytometry and microfluidics, we were able to monitor protein production at a single-cell level thus yielding information about intracellular protein distribution and culture heterogeneity. Conclusion Our results demonstrate that the iSplit GFP assay is suitable for the detection, quantification and online monitoring of recombinant protein production in B. subtilis during cultivation as well as for analyzing production heterogeneity and intracellular localization at a single-cell level. Graphic abstract Supplementary Information The online version contains supplementary material available at 10.1186/s12934-021-01663-7.