Optically transparent glass with antifogging and antibacterial properties is in high demand for endoscopes, goggles, and medical display equipment. However, many of the previously reported coatings have limitations in terms of long-term antifogging and efficient antibacterial properties, environmental friendliness, and versatility. In this study, inspired by catfish and sphagnum moss, a novel photoelectronic synergy antifogging and antibacterial coating was prepared by cross-linking polyethylenimine-modified titanium dioxide (PEI-TiO 2 ), polyvinylpyrrolidone (PVP), and poly(acrylic acid) (PAA). The asprepared coating could remain fog-free under hot steam for more than 40 min. The experimental results indicate that the long-term antifogging properties are due to the water absorption and spreading characteristics. Moreover, the organic−inorganic hybrid of PEI and TiO 2 was first applied to enhance the antibacterial performance. The Staphylococcus aureus and the Escherichia coli growth inhibition rates of the as-prepared coating reached 97 and 96% respectively. A photoelectronic synergy antifogging and antibacterial mechanism based on the positive electrical and photocatalytic properties of PEI-TiO 2 was proposed. This investigation provides insight into designing multifunctional bioinspired surface materials to realize antifogging and antibacterial that can be applied to medicine and daily lives.