A graphdiyne (GDY) and gold nanoparticles (AuNPs) nanocomposite was formed with AuNPs growing on the surface and between the layers of GDY, which was used as the sensing interface on carbon ionic liquid electrode (CILE) to detect 7-hydroxy-6-methoxy-hydrocoumarin (7-6-HDC) that isolated from the noni juice. The GDY-Au nanocomposite was characterized by different spectroscopic techniques, which exhibited corrugated and folded morphology with large specific surface area. The GDY-Au nanocomposite modified electrode displayed excellent performance which is attributed to the highly conductive nanocomposite, where GDY structure with defects could immobilize more AuNPs to decrease the electron transfer resistance. In addition, the reaction mechanism of 7-6-HDC at GDY-Au surface was deduced based on the electrochemical kinetics investigations. Combined with density functional theory calculation, it was verified that the active site of 7-6-HDC and the presence of AuNPs enhanced the electrocatalytic capacity of GDY-Au nanocomposite. Under optimal conditions, the modified electrode displayed a wider linear range from 10.0 nM to 1.0 mM for 7-6-HDC analysis with a detection limit of 3.22 nM (3S0/S). This work provides a promising material to realize accurate analysis for 7-6-HDC, and the discovered sensing mechanism provides method guidance for the exploration of other novel electrochemical sensors.