Lithiated graphitic carbon nitride (C3N4) was fabricated by electrochemical and solid-state reactions. The addition of Li to C3N4 results in a reaction between the Li and the graphite-like C3N species in C3N4. This irreversible reaction leads to the formation of Li-CH鈺怤R and Li-N鈺怌R2 species, which are detrimental to anode properties. Suitable nitrogen-doped carbon structures for anode applications are predicted to need high concentrations of pyridinic C鈥揘鈥揅 terminal bonds and low concentrations of quaternary C3N species to boost electronic conductivity and reversibly cycle Li ions.