A novel azobenzene polyelectrolyte (ABAPE) was synthesized based on chromophore 4-(4’-nitrophenylazo) naphthol (NPAN), epoxychloropropane and α-methacrylic acid. The ABAPE was characterized by FT-IR and UV-vis spectroscopy. The aggregation behaviors of ABAPE were investigated based on different pH values by the UV-vis spectroscopy. The isomerization behavior of the ABAPE in DMAC solution was studied by 256 nm UV irradiation light. Attenuated total reflection (ATR) method was adopted and carried out the measurement of refractive index of the thin film. The thermo-optic coefficient (dn/dT) was -2.9228×10-4°C-1 and was bigger than inorganic materials such as silica glass, zinc silicate glass, borosilicate glass and the organic materials of polystyrene and PMMA. These results showed that the polyelectrolyte could be used to carry out optical storage and thermo-optic switch.