A novel electrochemical sensor has been developed using the sonochemically synthesized samarium metal–organic framework (Sm-MOF) and the graphitic carbon nitride (GCN) composite for the selective determination of propyl gallate (PG). The as-synthesized Sm-MOF@GCN composite was characterized by XRD, XPS, and FESEM. The morphological studies of the prepared Sm-MOF@GCN composite revealed the bar-shaped Sm-MOF and porous sheet-like morphology of GCN. The combined effect of the Sm-MOF and GCN enhance the current density response and lowers the oxidation potential, which was beneficial for the electrochemical sensing of PG. Moreover, the high electrochemical active surface area (EASA) (0.0649 cm2) and the rate constant value (Ko) of 1.44x10-5 cm s−1 confirm the faster electron transfer kinetics at the interface of Sm-MOF@GCN composite. However, the developed Sm-MOF@GCN composite possesses linear range from 0.02 to 60 µM with a nanomolar detection level (2.05 nM), high sensitivity (0.1914 μA μM−1 cm−2), excellent reproducibility, repeatability, and stability for up to 30 days towards the PG detection. Finally, the Sm-MOF@GCN composite-modified electrocatalyst was utilized for the quantification of PG in foodstuffs such as instant noodles, cookies, cakes, and oils. The result of the study, the Sm-MOF@GCN composite displayed good recovery results, making it a promising candidate for detecting PG in real-world samples in view of its binder-free approach and facile fabrication process.