Confocal microscopy is an invaluable tool for studying fluorescent materials and finds a wide application in biology and in quantum sensing. Usually, these experiments are performed under ambient conditions, but many materials are air sensitive (for example, black phosphorus) and degrade quickly under the strong laser irradiance. Here, we present a glovebox-integrated confocal microscope designed for nitrogen-vacancy (NV) center-based nano-scale sensing and NMR spectroscopy in an inert gas atmosphere. Using black phosphorus as a test material, we confirm that the glovebox maintains low oxygen levels and prevents material degradation during laser exposure. We demonstrate the setup’s capabilities through experiments that show NV center detection and spin manipulation under a black phosphorus flake. This custom-built system enables the study of air-sensitive materials and opens new perspectives for exploring surface chemistry in a controlled environment. Our work outlines both the strengths and the challenges of using a glovebox-integrated confocal microscope for quantum technology applications.