Bacterial infections, aseptic loosening, and poor osseointegration remain challenges for orthopedic implants. In this study, we developed a dual-network polyelectrolyte antibacterial coating for orthopedic implants to prevent bacterial infections. The coating was prepared via UV-triggered in situ polymerization, composed of polyethyleneimine (PEI) and polyacrylic acid (PAA), with enhanced mechanical properties due to electrostatic interactions between them. The antimicrobial peptide ε-poly-L-lysine (EPL) was immobilized in the coating, providing efficient antibacterial functionality. The coating's substrate was made of hydroxyapatite (HA) and polylactic acid (PLA) composites to promote bone cell growth and tissue regeneration. In vitro experimental results demonstrated that the coating exhibited excellent antibacterial properties against both Gram-negative and Gram-positive bacteria, while enhancing the adhesion, proliferation, and differentiation of osteoblasts. In vivo experiments further confirmed the coating's capability to resist infection in an infected microenvironment. This study provides a practical strategy for developing orthopedic implant surface coatings with antibacterial functions.