To improve the flame retardancy of polyacrylonitrile (PAN) fibers, PAN fibers were firstly modified through amination with diethylenetriamine (DETA) to obtain ammoniated PAN fibers (A-PAN). Then, A-PAN underwent phosphorylation modification via phosphorus-containing flame retardant, i.e., tetrakis (hydroxymethyl) phosphonium sulfate (THPS) to fabricate flame retardant PAN fibers (THPS-A-PAN). XPS and FTIR confirmed the covalent bonding of DETA and THPS with PAN fibers. TGA showed improved thermal stability, particularly in increased char residue at high temperatures. The modified PAN fibers exhibited enhanced flame retardancy in vertical burning tests and MCC analysis, with LOI values increasing from 17% to 32.5% and maintaining at 26.5% after 30 laundering cycles (LCs). Fire safety parameters such as heat release capacity (HRC), total heat release (THR), and the fire growth index (FGI) decreased by 51.5%, 46.9%, and 41.9%, respectively. In addition, the tensile strength and elongation at break of THPS-A-PAN increased from 2.69 cN/dtex and 28.6% to 3.08 cN/dtex and 30.1% respectively, indicating enhanced mechanical properties. This work develops a feasible strategy to improve the flame retardancy of PAN fibers while endowing them with reinforced mechanical properties, which provides a possible research direction for the practical application of flame retardant PAN fibers.