Metal-organic frameworks (MOFs) exhibit highly adjustable porosity, structure, and versatility, properties that render them promising for electromagnetic wave (EMW) absorption applications. However, the impedance matching of these composites is poor in practical applications, thereby compromising their EMW absorption performance. In this study, a novel EMW absorbing composite was synthesized by a solution-thermal method combined with a subsequent pyrolysis process. Specifically, we introduced heteroatom (N and S) codoped graphene (N, S-Gr) into the Co-Ni MOF, forming N, S-Gr/CoNi/C. Graphene was endowed with abundant defect and disorder sites through the codoping of nitrogen and sulfur, which enhanced interfacial polarization and dipole polarization. When nickel and cobalt were added in a 1:1 ratio, the minimum reflection loss (RLmin) of the N, S-Gr/Co-Ni/C composite reached -47.7 dB at 4.24 GHz, and the resultant material exhibited the best absorption properties. As a result, this composite is considered to be an ideal candidate for the development of highly effective EMW absorbers.