A rapid, sensitive and low-fouling sensor for application to detect clinical biomarkers directly in biological media is highly desirable. Herein, we report a versatile strategy to prepare polyaniline (PANI) based conducting polymer hydrogel through the assembly of PANI and phytic acid (PA) by dynamic boronate bond. PANI/PA, a conductive hydrogel with high specific area and multiple pore structures have demonstrated excellent antifouling ability and electrochemical property. The electrochemical biosensors for microRNA can be developed by the immobilization of DNA probes onto PANI/PA interface (microRNA24 is used as a model case), and redox currents of PANI were utilized as the sensing signals to assay DNA/RNA hybridization reaction. Owing to the typical characteristics of PANI/PA hydrogel, the biosensor has shown excellent sensing performances with wide linear range (1.0 fM-1.0 pM), low sensing limit (0.34 fM) and efficient ability to detect microRNA mismatches. Given the facile processability, excellent stability and good antifouling property of the PANI/PA hydrogel, the proposed hydrogel-based biosensor may find broad applications in clinical diagnostics and biomedical devices.