The development of detecting hypochlorous acid (HClO) in living endoplasmic reticulum has attracted much attention in the fields of biology, medicine, and pharmacy. In the present work, the one-photon absorption (OPA), one-photon emission (OPE), and two-photon absorption (TPA) properties of a series newly synthesized chemosensors with naphthalimide as the fluorophore were systematically investigated using time-dependent density functional theory in combination with response theory. Special emphasis is placed on evolution of the probes' optical properties in the presence of HClO. These compounds show drastic changes in their photoabsorption and photoemission properties when they react with HClO, indicating them to be excellent candidates as fluorescent chemosensors. To further understand the mechanisms of the two probes, we have employed the hole and electron analysis to investigate the charge transfer process for the photoemission of the molecules. The receptor effect is found to play a dominant role in the sensing performance of these probes. Specifically, two-photon absorption properties of the molecules are calculated. We have found that all probes show significant two-photon responses in the near-infrared light region. And the maximum two-photon absorption cross section of probe 2 is greatly enhanced with the presence of HClO, indicating that probe 2 can act as a potential two-photon excited fluorescent HClO probe. The theoretical investigations would be helpful to build the structure-property relationships for the naphthalimide-contained probes, providing information on the design of efficient two-photon fluorescent sensors that can be used for biological imaging of HClO in endoplasmic reticulum.