A liquid-crystal (LC)-based sensor for detecting nitrite in aqueous solutions was developed using a diazotization reaction as the sensing mechanism. First, tetradecyl 4-aminobenzoate (14CBA) was synthesized and doped into a nematic LC, i.e., 4-cyano-4′-pentylbiphenyl (5CB). When the LC mixture was cast on a glass substrate and then immersed into an aqueous solution without nitrite, the orientation of LC was planar and the LC image was bright. In the presence of nitrite, it reacted with alkylanilines to give corresponding diazonium ions with a positive charge, which aligned at the LC/aqueous interface to cause homeotropic orientation of LC. As a result, a bright-to-dark transition of the LC image was observed. The limit of detection (LOD) of this system for nitrite is 25 μM with high selectivity. In addition, this system can work in environmental water samples such as tap water and pond water. Finally, we demonstrated that the optical signals of LC can be measured and recorded using a built-in digital camera of a smartphone, suggesting the portability of this system for on-site applications.