In this work, a novel phosphorus-nitrogen flame retardant (CN-DOPO), which was successfully prepared via a facile method of graphitic carbon nitride (g-C3N4) and 9,10-dihydro-9-oxa-10-phosphaphenanthrene-10-oxide (DOPO). Polyamide 6 (PA6) composites were then prepared through melt blending with different ratios of g-C3N4/DOPO and different contents of CN-DOPO. CN-DOPO was characterized and confirmed using X-ray diffraction (XRD), Fourier transform infrared spectra (FTIR), and scanning electron microscopy (SEM). PA6/CN-DOPO composites were investigated by limiting oxygen index (LOI), vertical combustion (UL-94), thermal gravimetric analysis (TGA), differential scanning calorimetry (DSC), and thermogravimetric analysis-infrared spectrometry (TGA-IR). The results indicated LOI value was increased from 23.4% to 29.2% and successfully passed UL-94 V-0 rating when the presence of CN-DOPO increased to 15 wt%. Moreover, mechanical properties of PA6/CN-DOPO composites had not deteriorated significantly due to CN-DOPO having better dispersion and compatibility in PA6. The morphological of char layer revealed that CN-DOPO formed a highly integrated char layer surface during the combustion process, as compared to that of pure PA6. Meanwhile, CN-DOPO decomposed to release gases could inhibit decomposition by diluting flammable volatiles. Accordingly, the special gas-condensed phase synergistic flame-retardant mechanism of PA6/CN-DOPO was proposed. This work indicated that CN-DOPO could endow PA6 with highly effective flame-retardant and good mechanical performance.