The lack of simple strategies for the design and fabrication of electrochromic (EC) sensors has obstructed the extensive application of these efficient devices in analytical chemistry. Herein, we introduced a novel EC sensor based on the proton sensitivity of conducting polyaniline (PANI) film to determine amines as model analytes. Firstly, the EC behavior of fluorine-doped tin oxide modified with PANI film (FTO/PANI) in both the absence and presence of different amines was studied. The results indicated that amines can interfere with the EC process of PANI. The change in the EC response of PANI at the wavelengths of 420 nm, 620 nm, and 750 nm enables the in- direct determination of amines. It should be emphasized that the absorption spectrum of amines exhibits no peaks in the visible regime. The present method exhibits triethylamine (as an amine) detection in the linear dynamic range of 0.10–7.01 µmol L−1 with a limit of detection of 0.06 µmol L−1. The EC mechanism of PANI towards amines was carefully studied using field emission scanning electron microscope (FESEM), Fourier- transform infrared (FT–IR), X-ray diffraction (XRD), and time-depended density functional theory (TD-DFT) techniques. Finally, as a practical application, the EC sensor was utilized to monitor the spoilage of beef and fish samples in the gaseous phase. The present assay can pave the way for the development of simple and efficient EC sensors.