One of the current challenges in the development of flame retardants is the preparation of an environmentally friendly multi-element synergistic flame retardant to improve the flame retardancy, mechanical performance, and thermal performance of composites. This study synthesized an organic flame retardant (APH) using (3-aminopropyl) triethoxysilane (KH-550), 1,4-phthalaadehyde, 1,5-diaminonaphthalene, and 9,10-dihydro-9-oxa-10-phosphaphenanthrene-10-oxide (DOPO) as raw materials, through the Kabachnik-Fields reaction. Adding APH to epoxy resin (EP) composites could greatly improve their flame retardancy. For instance, UL-94 with 4 wt% APH/EP reached the V-0 rating and had an LOI as high as 31.2%. Additionally, the peak heat release rate (PHRR), average heat release rate (AvHRR), total heat release (THR), and total smoke produced (TSP) of 4% APH/EP were 34.1%, 31.8%, 15.2%, and 38.4% lower than EP, respectively. The addition of APH improved the mechanical performance and thermal performance of the composites. After adding 1% APH, the impact strength increased by 15.0%, which was attributed to the good compatibility between APH and EP. The TG and DSC analyses revealed that the APH/EP composites that incorporated rigid naphthalene ring groups had higher glass transition temperatures (Tg) and a higher amount of char residue (C700). The pyrolysis products of APH/EP were systematically investigated, and the results revealed that flame retardancy of APH was realized by the condensed-phase mechanism. APH has good compatibility with EP, excellent thermal performance, enhanced mechanical performance and rational flame retardancy, and the combustion products of the as-prepared composites complied with the green and environmental protection standards which are also broadly applied in industry.