Preparation of flame retardant rigid polyurethane foams (RPUFs) from sustainable material sources like recycled polyethylene terephthalate (rPET) remains a challenge due to the difficulty in controlling the synthesis of polyols with flame retardant functionalities. Here, we propose a method for converting rPET into a polyester-amide-ether oligools incorporated flame retardant triazine-ring through the partial codepolymerization of rPET by 1,3,5-tris(hydroxymethyl isocyanurate (THMI), ethanolamine, and diethylene glycol, followed by linking oligools into polyols with phthalic anhydride. THMI was synthesized through nucleophilic additions of formaldehyde with isocyanuric acid. The codepolymerization and linking were carried out using a one-pot method. Single-factor experiments were implemented to optimize the process parameters such as reacting temperature and time. The L9 (4³) orthogonal experiments were employed to systematically investigate the influence of the dosages of four raw materials on the performance of the synthesized polyols. Based on the range analysis of acid value, hydroxyl value, and viscosity of the synthesized polyols, the optimized polyol was synthesized as a candidate for preparing flame retardant RPUFs. Results demonstrated that the obtained RPUF derived from the optimized polyol could achieve a limiting oxygen index (LOI) value of 30.3% when mixed with phosphorous-containing flame-retardant DCPP, meeting the national standard of combustible stage B1. The high flame retardancy RPUF obtained from an rPET-based polyol with a triazine ring represents a novel and practical method of preparation, providing new insights into the optimization of synthesis parameters across multiple factors and levels.