The invention discloses an electrochemical sensor for detecting nitrite, a preparation method and application, and belongs to the field of electrochemical analysis. The preparation method comprises the following steps of: etching aluminum carbide to obtain titanium carbide with of accordion-like structure, calcining the titanium carbide serving as a titanium source to obtain titanium dioxide-titanium carbide, dispersing the compound into a solution containing hexadecyl trimethyl ammonium bromide and chitosan, and performing ultrasonic treatment to obtain a composite solution. According to theelectrochemical sensor for detecting nitrite, the preparation method and the application, a three-electrode system is adopted, a glassy carbon electrode modified by a titanium dioxide titanium carbide / hexadecyl trimethyl ammonium bromide / chitosan compound is used as a working electrode, and the nitrite is determined by differential pulse voltammetry. The electrochemical sensor disclosed by the invention has the advantages of high sensitivity, good selectivity, low detection limit, quick response and the like in nitrite detection, and has a wide application prospect in the aspects of environment and food detection.