In the current study, a pH-electroactive hydrogel of bacterial cellulose (BC) and polyaniline (PAni) was fabricated through chemical oxidation polymerization for the development of a controlled drug release system. PAni was densely arrayed along the BC fibers and berberine hydrochloride (BH) was diffused within the hydrogel matrix as confirmed by field emission scanning electron microscope (FESEM) and fourier transform infrared (FTIR) analyses. The pH-electroactive drug release behavior of BC/PAni hydrogel was investigated in vitro. Variation in pH values from 2.2 to 11 demonstrated different drug release profiles from BC/PAni electroactive hydrogel: fast in alkaline and slow in acidic environments as indicated by a color change between green and dark, respectively. The drug release from BC/PAni hydrogel was stable and continuous which showed a typical pH-electroactive drug release behavior. The drug release curves closely matched the Korsemyer-Peppas kinetic model with free diffusion. Owing to its porous nature, conductive properties, and pH-electroactive drug release behavior, the developed BC/PAni hydrogel system can find potential applications as a controlled drug release system.