Using the density functional tight binding method (DFTB) and the GFN1-xTB (geometries, frequencies, and noncovalent interactions tight binding) Hamiltonian, we have investigated the structural, electronic, and magnetic properties of vacancy defects, hydrogen- and oxygen-passivated defects, and Fe adsorption in two-dimensional (2D) graphitic carbon nitride (gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) ) 2D material. The ring shape is the most preferred vacancy evolution path, with significant stability of the semicircle fourfold C-N-C-N vacancy. We found that bare gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) which is nonmagnetic becomes magnetic by 2- and 5-defect creation, hydrogen/oxygen passivation of the defects, and upon Fe adsorption. Interestingly, Fe atoms interact with the gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) sheet and result in a ground ferromagnetic (FM) state. In addition, we investigate the effects of passivating the vacancies by hydrogen in gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) on its structural, electrical, and magnetic properties. We found that substituting the 1-, 2-, and 3-vacancies with hydrogen and passivating the 6-defect with oxygen turn on magnetism in the system. Due to structural distortion, the passivated defects do not have a well-ordered magnetic orientation. However, passivating the remaining defected structures maintains the nonmagnetic state. It is also shown that passivation leads to a semiconductor with a band gap value higher than that of the bare material. We also calculate the electronic and magnetic properties of transition metal (TM) atoms, including V-, Cr-, Mn-, Fe-, Co-, Ni-adsorbed gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) monolayer. All TM atoms show slight lattice distortion, and the adsorbed system almost maintains the original structure type. Moreover, a FM alignment was observed with total magnetic moments of 2.89 \(\mu _{\textrm{B}}\) , 2 \(\mu _{\textrm{B}}\) , and 1 \(\mu _{\textrm{B}}\) for V, Fe, and Co atoms, respectively. The Cr, Mn, and Ni atoms induce no magnetism to the nonmagnetic gt- \(\hbox {C}_{\textrm{3}}\) \(\hbox {N}_{\textrm{4}}\) system.