Photosensitive nanoparticles (NPs) were fabricated by employing chitosan hydrochloride (CHC) and photosensitive 4-oxo-4-(pyren-4-ylmethoxy) butanoic acid (PYBA) through ionic self-assembly. Transmission electron microscope (TEM) images showed that the average diameter of the complex NPs depended on the charge molar ratio of PYBA to CHC. The photosensitive properties of the NPs were investigated using (1)H NMR, optical photography, dynamic light scattering and TEM. As a model guest, Nile red dye was loaded in the photosensitive NPs. Under UV light or near infrared laser irradiation, the complex could be dissociated and shrank, so that loaded Nile red was released owing to the decomposition of chemical bonds in the photolabile chromophore groups. The results showed that 70% of the Nile red molecules were released from the NPs under a 1200 mW cm(-2) irradiation of UV light for 50 s. Moreover, the releasing rate of Nile red molecules could be adjusted by altering UV light intensity. Such a chitosan complex has potential applications in the design of photo-controlled guest delivery systems.