Fluorescent carbon nanomaterials have drawn tremendous attention for their intriguing optical performances, but their employment in solid-state luminescent devices is rather limited as a result of aggregation-induced photoluminescence quenching. Herein, ultrathin carbon nitride (CN) is synthesized within the 2D confined region of layered double hydroxide (LDH) via triggering the interlayer condensation reaction of citric acid and urea. The resulting CN/LDH phosphor emits strong cyan light under UV-light irradiation with an absolute solid-state quantum yield (SSQY) of 95.9 ± 2.2%, which is, to the best of our knowledge, the highest value of carbon-based fluorescent materials ever reported. Furthermore, it exhibits a strong luminescence stability toward temperature, environmental pH, and photocorrosion. Both experimental studies and theoretical calculations reveal that the host-guest interactions between the rigid LDH matrix and interlayer carbon nitride give the predominant contribution to the unprecedented SSQY and stability. In addition, prospective applications of the CN/LDH material are demonstrated in both white light-emitting diodes and upconversion fluorescence imaging of cancer cells.