Nitrate (NO3−) contamination from agricultural and industrial waste affects environmental water quality and can cause severe diseases if consumed in drinking water. Therefore, the detection of NO3− is a necessary precaution. This work describes the development of an electrochemical sensor for NO3− detection that combines the advantages of ordered mesoporous carbon (OMC) and copper foam (Cu foam) on a glassy carbon electrode (Cu foam/OMC/GCE). The large surface area, uniform pore structure, and large pore volume of OMC supported the electrodeposition of Cu foam to create a highly porous electrocatalytic structure for NO3− reduction. Under optimal conditions, the developed electrochemical sensor exhibited linearity from 1.0 µM to 5.0 mM and a detection limit of 1.0 µM (S/N = 3). Moreover, the proposed electrochemical sensor exhibited acceptable selectivity, and good stability and reproducibility. The developed sensor detected NO3− in drinking water samples with recoveries of 88.2±0.9 to 112.5±6.3%.