Glyphosate has become the most widely used herbicide worldwide in recent years. There are many concerns about toxicity and mutagenicity from long-term use of glyphosate in humans and animals. Therefore, the methods that can help in easy and quick detection of this chemical compound in food and water are critical. In this work, a biosensor was fabricated by combining the enzymatic properties of a specific DNA G-quadruplex and selectivity of a split aptamer to detect glyphosate in foods and water in a quick and simple colorimetric manner. The color change in this method is based on the oxidation of TMB by the G-quadruplex enzyme and the function of aptamer to trap glyphosate, which is visible to the naked eye in the presence and absence of the herbicide. The biosensor showed its high performance in various real samples of water and foods and provided a detection limit of 1.37 nM (R² = 0.9899) with a linear response range of 100 to 400 nM of glyphosate. This biosensor can provide an innovative, cheap and fast approach for the detection and monitoring of glyphosate in various foods and water.