Purpose Ascorbic acid, a water-soluble antioxidant, is an essential component of the human diet and is known for its potent antioxidant properties against several diseases. In recent years, there has been increasing interest in the development of nonenzymatic sensors due to their simplicity, efficiency and excellent selectivity. The aim of this study is to present a selective and sensitive method for the detection of ascorbic acid in aqueous system using a new electrochemical non-enzymatic sensor based on a gold nanoparticles Au-NPs-1,3-di(4-bromophényl)-5-tert-butyl-1,3,5-triazinane (DBTTA) composite. Design/methodology/approach Using the square wave voltammetry (SWV) technique, a series of Au-NPs-DBTTA composites were successfully developed and investigated. First, DBTTA was synthesized via the condensation of tert-butylamine and a4-bromoaniline. The structure obtained was identified by IR, 1H NMR and 13C NMR analysis. A glassy carbon electrode (GCE) was modified with 10–1 M DBTTA dissolved in an aqueous solution by cyclic voltammetry in the potential range of 1–1.4 V. Au-NPs were then deposited on the DBTTA/GCE by a chronoamperometric technique. SWV was used to study the electrochemical behavior of the modified electrode (DBTTA/Au-NPs/GCEs). To observe the effect of nanoparticles, ascorbic acid in a buffer solution was analyzed by SWV at the modified electrode with and without gold nanoparticles (Au-NPs). Findings The DBTTA/Au-NPs/GCE showed better electroanalytical results. The detection limit of 10–5 M was obtained and the electrode was proportional to the logarithm of the AA concentration in the range of 5 × 10−3 M to 1 × 10−1 with very good correlation parameters. Originality/value It was also found that the elaborated sensor exhibited reproducibility and excellent selectivity against interfering molecules such as uric acid, aspartic acid and glucose. The proposed sensor was tested for the recognition of AA in orange, and satisfactory results were obtained.