We report a simple method to fabricate Mn-doped poly(triazine imide) (PTI) by using melamine and cyanuric chloride as the building blocks, and Mn as the coupling agent. This material forms a two-dimensional imide-bridged triazine (C6N9H3) network, with an ordered arrangement of 24-atom voids. The synthesized PTI exhibits a large magnetization due to the localized d-electrons of Mn2+ ions, which suggests that PTI contains a large number of Mn2+ ions in the 24-atom voids. In addition, on being treated with HNO3, PTI absorbs NO3− ions in the 24-atom voids, which replace the Mn2+ ions present there, and forms a structurally well-ordered host-guest conjugated sheet, PTI·NO3. X-ray diffraction measurements of PTI·NO3 indicate that it crystallizes in the hexagonal space group P63cm, with lattice parameters a = 8.43 Å and c = 6.52 Å. The remaining Mn2+ ions are intercalated within the interlayer 24-atom void center sites to maintain charge balance, and constitute an Mn–NO3 column along the c-axis. The Mn2+-intercalated PTI·NO3 structure exhibits Curie paramagnetism, with a negative Weiss temperature. The present study reports the bulk synthesis of a well-characterized, crystalline, graphitic carbon nitride containing magnetic transition metal (TM) ions, that has potential applications in carbon-based magnetic materials and catalysis.