Organophosphorus pesticides (OPs) residues in agricultural products such as vegetables, fruits, and grains pose a threat to food safety and human health. In this work, a novel and highly sensitive electrochemical biosensor was developed for OPs residues detection in real sample, based on the immobilization of acetylcholinesterase (AChE) by electrostatic adsorption on a glassy carbon electrode (GCE) modified with composite nanomaterials of porphyrin-based covalent organic frameworks (p-COFs) loaded by gold nanoparticles (AuNPs) and poly (diallyldimethylammonium chloride) (PDDA). Due to the synergistic effect of p-COFs, AuNPs and PDDA, the fabricated biosensor displayed the remarkable properties with the high electrocataytic activity, and excellent biocompatibility, resulting in a significant signal amplification of as-prepared biosensor. Under optimized conditions, the biosensor showed excellent sensing performances for the detection of methyl parathion (MP), with wide linear ranges from 1.9 × 10−9–3.8 × 10−5 M and a low detection limit as low as 2.3 × 10−10 M, as well as the satisfactory selectivity, excellent reproducibility, anti-interference properties and good stability. It was also successfully applied to the monitoring of MP content in vegetables and fruits, which may be explore a new opportunity for the potential utilization in analysis field.