A simple 4-nitrosalicylaldimine-based receptor equipped with rhodamine B moiety (RB-HN) has been designed and synthesized as an “OFF–ON–OFF” dual sensor for the detection of Cu2+ and Al3+ ions, which exhibits high sensitivity over other metal ions. The chemosensor RB-HN demonstrates selective optical recognition for Cu2+ and fluorescence recognition for Al3+ over commonly coexistent metal ions in DMSO–H2O media. The LODs of the RB-HN for Cu2+ and Al3+ were 4.726×10−7 and 4.43×10−7M, respectively. A coordination mode with 1:1 stoichiometry was proposed between RB-HN and Cu2+/Al3+ by the 1H NMR binding studies. The RB-HN complex with Cu2+ and Al3+ ions exhibits “turn on–off” behavior and is highly reversible with EDTA. In addition, the UV–vis and fluorescence changes of RB-HN by the inputs of Cu2+ and Al3+ have been used to construct a combinational logic circuit at the molecular level. Moreover, a novel selective and sensitive solid sensor (PEGDMA-RB-HN) was designed to detect and extract Al3+ ions from aqueous solution. Furthermore, the sensitivity of the solid sensor was demonstrated by confocal laser scanning microscopy (CLSM) and scanning electron microscopy (SEM). The extracting capacity of the solid sensor was validated with ICP-AES, and it was significantly lower than the WHO recommendations for drinking water.