Four new cyano-substituted styryl derivatives based on carbazole and phenothiazine were facilely synthesized by conventional Knoevenagel condensation and well characterized. The UV–vis spectra of these dyes showed the lowest-energy absorption bands were mainly caused by the HOMO–LUMO one-electron promotion as conformed by TD-DFT calculations. The thermogravimetric analysis showed these dyes were thermally stable up to 350°C. The UV–vis absorption and fluorescence emission spectra were also studied in solvents of different polarity, these dyes exhibited unusual large Stokes shift.