Thermal ammonolysis of quasi-two-dimensional (quasi-2D) CoTa2O6 yields the O2-/N3- and anionic vacancy ordered Co2+Ta5+2O6-xN2x/3$Box$x/3 (x $leq$ 0.15) that exhibits a transition from antiferromagnetism to defect engineered above room-temperature ferromagnetism as evidenced by diffraction, spectroscopic and magnetic characterizations. First-principles calculations reveal the origin of ferromagnetism is a particular CoON configuration with N located at Wyckoff position 8j, which breaks mirror symmetry about ab plane. A pressure-induced electronic phase transition is also predicted at around 24.5 GPa, accompanied by insulator-to-metal transition and magnetic moment vanishing.