A new set of metal-organic frameworks was designed by functionalizing g-C3N4 with benzoic acid and using them as structure-directing ligands during the metal-organic framework (MOF) formation. One such MOF exhibited dual emissions, both metal- and ligand-centered, enabling ratiometric sensing of the carcinogenic industrial solvent dioxane. The fabricated MOFs possessed a unique fluffy spherical morphology that enabled atomic level resolution in transmission electron microscopy-a rarity in MOFs due to the 'Knock-on' effect. Sensor experiments showed a rapid response within 5 s of analyte introduction and achieved a low limit of detection (LOD) of 0.026 ppm, well below the FDA-approved level of 10 ppm. In addition, the sensor exhibited exceptional selectivity, discriminating 1,4-dioxane from a pool of 16 solvents. This increased sensing capability was attributed to the formation of complexes and precise alignment of energy levels between the host and analyte, facilitating photoinduced electron transfer (PET). This material is equally efficient for colorimetric detection of the same solvent under excitation of UV light as well as gas phase detection of this volatile organic compound through I-V characteristics. Density functional theory (DFT) analysis supported the crucial role of Eu and the ligand system in efficiently detecting 1,4-dioxane by fluorescence spectroscopy, as shown in the energy level diagram. Future research could focus on optimizing these metal-organic frameworks for enhanced industrial applications in the detection of dioxane and exploring their potential applications in real-world environmental monitoring and public health safety.