A study was conducted at different combinations of ozone concentration (50%–100%) and time (10–30 min) to study the effect of aqueous ozone treatment on chlorpyrifos degradation in cucumber. A process was developed and compared using ANN‐GA and RSM techniques. The optimum conditions obtained using RSM were ozone concentration of 95% and treatment time of 10 min. While the optimum conditions achieved by ANN‐GA were ozone concentration of 81% and treatment time of 14 min. However, chlorpyrifos degradation is more at the condition optimized by ANN compared to the condition optimized by RSM. At the optimum condition, the cucumber showed superior physicochemical and microbial qualities, including pesticide degradation (91.08%), color change (3.58), firmness (11.75 N), moisture content (97.49%), water activity (0.93), pH (6.18), titratable acidity (0.06%), total soluble solids (2.1 °Brix), total plate count (1.5 × 105 CFU/g), and yeast/mold count (3 × 105 CFU/g), respectively.Practical applicationsIncreased awareness of the health benefits associated with the consumption of fruits and vegetables has led to a rise in their consumption. These items are primarily consumed in their raw or fresh state and often feature in salads. However, the presence of pesticide residues on the surface of raw fruits and vegetables can pose significant health risks to consumers. Ozone treatment can be used for effectively removing pesticide residue in the fresh‐cut fruits and vegetables industry. Also, ozone treatment can reduce the microbial count on the surface of fruits and vegetables which enhances the shelf life of fruits and vegetables. Furthermore, it can prevent the natural ripening process of commodities, thereby increasing the consumer's acceptance. Ozone is considered a safe and eco‐friendly alternative to chemical disinfectants and preservatives. It leaves no chemical residue on the produce and breaks down into oxygen, leaving no harmful byproducts, thereby ensuring safe consumption of the commodity.