This study focuses on the extraction of ellagic acid (EA), a valued phenolic compound, from agricultural waste chestnut shell samples. A novel approach is introduced using a combination of boronic acid-modified molecularly imprinted polymer (ZIF@B@MIP) and a nanocomposite of graphene oxide-coated silver nanoparticles (GO@Ag@GSH) to enhance EA enrichment. ZIF@B@MIP precisely captured EA through boronate affinity-based molecular imprinting recognition. ZIF@B@MIP employs boronate affinity-based molecular imprinting recognition to precisely capture EA, while GO@Ag@GSH provides ample adsorption sites. The synergistic effect of ZIF@B@MIP and GO@Ag@GSH demonstrates excellent enrichment capability and selectivity for EA. High-performance liquid chromatography (HPLC) is employed for sensitive EA detection, achieving a maximum adsorption capacity of 46.25 mg g–1 and an imprinting factor of 3.01. The adsorption capacity to different structural analogue was investigated, and the selectivity coefficient was used to evaluate the selectivity, and its value was 1.16–3.01. The method successfully enriches EA in chestnut shell samples with a recovery rate of 95.6 %–110.1 %. This research presents an innovative approach for effective phenolic components enrichment from natural resources for pharmaceutical and biochemical applications.