Two novel polyamides, Poly(Oxa) and Poly(Pip), were successfully synthesized through the polycondensation of 1,4-bis(2-chloroacetamido)benzene with either 5,5′-(1,4-phenylene)bis(1,3,4-oxadiazole-2-thiol) or piperazine, respectively. Comprehensive computational, structural, morphological, thermal, and photophysical analyses revealed distinct structure–property relationships governed by the nature of the polymer backbone. Poly(Oxa), containing a heteroaromatic framework, exhibited pronounced conjugation and semi-crystallinity, confirmed by FT-IR and XRD analyses. This architecture imparted exceptional thermal stability (char yield: 42.4 %), high flame retardancy (LOI = 34.5 %), and a heterogeneous morphology with strong π–π stacking interactions, which enhanced methylene blue adsorption. Remarkably, Poly(Oxa) displayed excitation-dependent photoluminescence, shifting from deep-blue to …