Melamine is an organic base and a triazine of cyanamide with a 1,3,5-triazine skeleton. It contains 67% a nitrogen by mass. It is introduced as a contaminant in food products with the intent to falsify total protein content. The illegal adulteration of infant milk powder with melamine has resulted in chronic kidney and urinary tract failure. To date, several analytical methods have been developed for the detection of melamine. However, the existing methods are complicated, time consuming and costly. There is an urgent need to develop a simple, fast and effective method for the analysis of melamine in infant milk and milk products. For that reason, an novel electrochemical method was developed based on an ionic liquids (1-ethyl-3-methylimidazolium trifluoromethanesulfonate ([EMIM][Otf])), zinc oxide nanoparticles (ZnONPs) with chitosan (CHIT), and the modified gold electrode (AuE). Methylene blue was used as a redox indicator for increasing the electron transfer in electrochemical cell. The electrochemical behaviour of the modified gold electrode was studied by using cyclic voltammetry and differential pulse voltammetry at the presence of melamine. The morphological characteristics were observed under scanning electron microscope and transmission electron microscope. The electrochemical sensor showed an optimal response within 30 s, pH 7.0 and 0.3 V. Under optimal conditions, differential pulse voltammetry was detected a wide linear range of melamine concentrations from 9.6 × 10−4 to 9.6 × 10−13 M, with a detection limit 9.6 × 10−14 M. The linear regression equation for the calibration plot was calculated to be y = 0.4239x + 6.6686 (r2 = 0.9836), where x is the concentration of melamine and y is the oxidation current. The proposed method is fast and simple procedure technique for analysing the melamine level in milk powder products.