The absence of d-orbital electrons or presence of full-filled d-orbital electrons in metal ions is a well-known Achilles' heel problem for the detection of these metal ions by a simple UV-visible study. For this reason, detection of metal ions such as Al 3+ with no d-orbital electrons or Zn 2+ with filled d-orbital electrons is a challenging task. Herein, we report a 2-naphthol-based fluorescent probe [1-((E)-((E)-(5-bromo-2-hydroxybenzylidene)hydrazono)methyl)naphthalen-2-ol] (H 2 L) that has been used to sense and discriminate Al 3+ and Zn 2+ via solvent regulation. The probe exhibits excellent selectivity and swift sensitivity toward Al 3+ in MeOH− water (9:1, v/v) and toward Zn 2+ in dimethyl sulfoxide (DMSO)−water (9:1, v/v) among various metal ions. The respective detection limit is found to be 9.78 and 3.65 μM. The sensing mechanism is attributed to multiple processes, viz., the inhibition of photo-induced electron transfer (PET) along with the introduction of chelation-enhanced emission (CHEF) and excited-state intramolecular proton transfer (ESIPT) inhibition, which are experimentally well verified by UV−vis absorption spectroscopy, emission spectroscopy, and NMR spectroscopy. The probe shows aggregation-induced emissive (AIE) response in ≥70% aqueous media as well as in the solid state. The experimental results are well corroborated by time-resolved photoluminescence (TRPL) and density functional theory (DFT) calculations. An advanced-level OR-AND-NOT logic gate has been constructed from a different chemical combinational input and emission output. The reversible recognition of both Al 3+ in MeOH−water (9:1, v/v) and Zn 2+ in DMSO−water (9:1, v/v) is also ascertained in the presence of Na 2 EDTA, enabling the construction of a molecular memory device. The probe H 2 L also detects intracellular Al 3+ /Zn 2+ ions in Hela cells. Altogether, our fundamental findings will pave the way for designing and synthesis of unique chemosensors that could be used for cell imaging studies as well as constructing molecular logic gates.