A series of polyesters with alkylated triazole heterocyclic rings at the branches were designed and synthesized via the polycondensation reaction. The synthesized polyesters were examined with various spectroscopic methods such as Fourier transform IR, 1H NMR and 13C NMR. The alkyl chain length at the branch was found to affect the thermal stability of the polyesters, which decreased with longer alkyl chain. These polyesters possessed an aggregation‐induced emission enhancement characteristic evidenced by the transformation of the clear solutions in tetrahydrofuran with weak greenish blue emission to cloudy solutions with enhanced blue emission when water was added to promote aggregation. Furthermore, enhancement in the photoluminescence intensity was observed when the polyesters underwent photocrosslinking upon UV irradiation and appeared as self‐assembled aggregates. The formation of aggregates in the water − tetrahydrofuran solutions and after photocrosslinking was confirmed via TEM analysis. The SEM images showed that the photocrosslinked polyesters were highly porous which may enhance the π − π stacking interaction that improved the photoluminescence intensity. © 2015 Society of Chemical Industry