A fluorescent chemosensor based on naphthalimide derivative (HL) was prepared and characterized. HL exhibited strong fluorescence emission at 528 nm, which was attributed to naphthalimide moiety, while the addition of Cu2+ almost completely quenched the fluorescence emission. However, with the addition of S2−, the fluorescence at 528 nm reoccurred remarkably. The detection limits for Cu2+ and S2− were measured to be 1.72 × 10−7 M and 2.66 × 10−7 M, respectively. As determined, the fluorescence behavior of HL in the presence of Cu2+ and S2− could be manufactured to IMPLICATION type logic gate. Moreover, confocal fluorescence imaging in HepG2 cells indicated that the HL could act as a useful fluorescent probe for intracellular Cu2+ and S2− detection with negligible cytotoxicity.