A novel electrochemically sensitive sensor has been developed based on Hydrochar derived from Phoenix dactylifera was prepared for the detection of Methylene Blue (MB). These hydrochar (HC) have been used for the modification of the glassy carbon electrode (GCE). This electrode was characterized by scanning electron microscopy (SEM). The electrochemical properties of MB in the modified electrode (HC/GCE) were studied by square-wave voltammetry (SWV) and cyclic voltammetry (CV) under optimized conditions. Owing to a synergistic effect, the HC/GCE exhibited an obvious electrocatalytic effect on positively charged MB. The influence of experimental variables (accumulation time, supporting electrolyte, pH) was studied. Under optimized conditions, the constructed sensor illustrated a linear voltammetric curve for the MB in the concentration interval from 10-4M to 10-10M, with a detection limit of 0.2nM. A study of the effect of interference on sensor functionality was carried out, as well as an analysis of MB recovery in real wastewater samples. The modified electrode offers numerous advantages, including easy preparation, low detection limit, high sensitivity, good repeatability, short response time and an effective detection platform for MB in wastewater.