The PS defect is obtained by replacing one S atom with one P atom in the wide-bandgap semiconductor MgS. Based on first-principles calculations, the formation energy, defect levels, and electronic structure of the PS defect in different charge states are evaluated. We predict that the neutral PS
0 and positively charged PS
+1 are the plausible qubit candidates for the construction of quantum systems, since they maintain the spin conservation during optical excited transition. The zero-phonon line at the PS
0 and PS
+1 defects are 0.44 eV and 0.21 eV, respectively, which fall in the infrared band. In addition, the zero-field splitting parameter D of the PS
+1 with spin-triplet is 2920 MHz, which is in the range of microwave, showing that the PS
+1 defect can be manipulated by microwave. Finally, the principal values of the hyperfine tensor are examined, it is found that they decay exponentially with the distance from the defect site.