The construction of hydroxyapatite (HA) antibacterial coating on titanium surface is one of the current research hot topics. Natural antimicrobial agents can promote bone production while sterilizing. In this paper, Polypyrrole (PPy) is driven in situ by pulsed electrochemical deposition. Under the oxidation potential, the amino group of Pyrrole (Py) monomer interacts with PO43− and Dexamethasone root ion(Dex−) in the electrolyte through electrostatic interaction. The phenolic hydroxyl group chitosan quaternary ammonium salt (2-hydroxypropyltrimethyl ammonium chloride chitosan, HTCC) interacts with N atom of the amino group on Py and forms hydrogen bonds to assist Py in regulating Dexamethasone (Dex) the drug. While under the reduction potential, OH− is produced near the working electrode to promote the generation of HA, and finally forms the PPy@HA/Dex/HTCC composite coating. The study show that the composite coating is spherical nanoparticles with uniform distribution, and the regulation effect of PPy reduces the release rate of Ca2+ and Dex− from the coating, making it release smoothly and slowly. The antibacterial ratio of the composite coating against Escherichia coli (E. coli) and Staphylococcus aureus (S. aureus) reaches 100%, the osteoblasts and vascular endothelial cells proliferate well on the surface of the composite coating in vitro. Besides, the composite coating can induce the growth of apatite, proving that it has good bioactivity.