The prevention of biofilm formation on medical devices has become highly challenging in recent years due to its resistance to bactericidal agents and antibiotics, ultimately resulting in chronic infections to medical devices. Therefore, developing inexpensive, biocompatible, and covalently bonded coatings to combat biofilm formation is in high demand. Herein, we report a coating fabricated from tannic acid (TA) as an adhesive and a reducing agent to graft the zwitterionic polymer covalently in a one-step method. Subsequently, silver nanoparticles (AgNPs) are generated in situ to develop a coating with antifouling and antibacterial properties. To enhance the antifouling property and biocompatibility of the coating, the bioinspired zwitterionic 2methacryloyloxyethyl phosphorylcholine (MPC) was copolymerized with 2-aminoethyl methacrylamide hydrochloride (AEMA) using conventional free-radical polymerization. AEMA moieties containing amino groups were used to facilitate the conjugation of the copolymer with quinone groups on TA through the Michael addition reaction. Three copolymers with different ratios of monomers were synthesized to understand their impacts on fouling resistance: PMPC 100 , p(MPC 80 -st-AEMA 20 ), and p(MPC 90 -st-AEMA 10 ). To impart antibacterial properties to the surface, AgNPs were formed in situ, utilizing the unreacted quinone groups on TA, which can reduce the silver ions. The successful coating of TA and copolymer onto the surfaces was confirmed by attenuated total reflectance Fourier transform infrared (ATR-FTIR) spectroscopy, and its excellent wettability was verified by the water contact angle (CA). Furthermore, the functionalized coatings showed antibacterial properties against E. coli and S. aureus and remarkably decreased the adhesion of the BSA protein. The surfaces can also prevent the adhesion of bacteria cells, as confirmed by the inhibition zone test. In addition, they showed negligible cytotoxicity to normal human lung fibroblast cells (MRC-5). The as-prepared coatings are potentially valuable for biomedical applications.