Tackling the challenge of developing ultralong organic phosphorescence (UOP) materials with a high phosphorescence quantum yield (Φphos.) and an ultralong phosphorescence lifetime (τphos.) under ambient conditions is urgently needed. Herein, typical organic luminogens with simple chemical structures, namely, triphenylamine (TPA), 9-phenylcarbazole (PCz), and indolo[3,2,1-jk]carbazole (ICz), are doped into a melamine–formaldehyde (MF) polymer matrix with a compact three-dimensional covalent network to prepare UOP materials, respectively. Both experiments and theoretical calculations suggest that restricting intramolecular motions to suppress the nonradiative decay of triplet excitons plays a critical role in achieving ultralong room-temperature phosphorescence from organic molecules in polymer matrices. The luminophore ICz with a planar and rigid chemical structure, constructed by locking the molecular conformation of TPA via carbon–carbon single bonds, exhibits a bright organic afterglow with a Φphos. up to 38.31 % and a τphos. up to 2.73 s in the MF polymer under ambient conditions, representing one of the most excellent polymer-based organic afterglow materials in comprehensive UOP performance. The gradual enhancement in UOP of the resulting luminescent materials has led to their successful use in multi-level anti-counterfeiting. This work provides an effective strategy for developing organic afterglow materials with both high Φphos. and τphos. values.