Efficient and specific isolation and capture of phenolic acids (PAs) in complex samples is challenging due to its high polarity. In this study, combining the merits of porous monolith, ionic liquids, molecularly imprinted polymer and electroenhanced solid-phase microextraction (EE-SPME), a new sample pretreatment method was developed for the selective isolation and extraction of PAs. Using vanillic acid (VA) as template molecule, mixed ionic liquids including 1-allyl-3-methylimidazoliumbis[(trifluoromethy)sulfonyl]imide and N,N,N-trimethyl-1-(4-vinylphenyl)methanaminium chloride were chosen as dual functional monomers, a molecularly imprinted monolith-based microelectrode (MBM) was in-situ fabricated. Under the EE-SPME format, the extraction behaviors and specific recognition performance of MBM towards VA and its structural analogues were investigated in detail. Results revealed that the exertion of electric field during extraction period increased the imprinted factors from 1.57–1.77 to 1.87–2.23. Under the beneficial parameters, a sensitive and reliable approach for the quantification of PAs contents in water and fruit juice samples by the combination of MBM/EE-SPME with HPLC technique was developed. The achieved limits of detection ranging from 0.012 μg/L to 0.11 μg/L and 0.042 μg/L to 0.15 μg/L for waters and juices, respectively, and the recoveries with different spiked concentrations in actual sample were 83.1–110 %. In comparison with the existing approaches, the established method presented some characteristics in the analysis of PAs, such as simplicity, high cost-effectiveness, good anti-interference performance, satisfactory sensitivity and low consumption of solvent.