This study provides a basis for selecting dental materials and lays a foundation for developing new dental materials. Four dental restorative materials were divided into two groups: Streptococcus mutans and Actinomyces viscosus, five root canal sealing materials were divided into two groups: Porphyromonas gingivalis and Enterococcus faecalis. Each material block was immersed in the corresponding group of the bacterial solution and cultured under anaerobic conditions at 37°C for 2, 4, 6, 8, 12, 16, 20, and 24 h. The adhesion of bacteria was observed, the number of different bacteria adhering to various material model disks was calculated at different time intervals under a scanning electron microscope. 24 hours later, the number of Streptococcus mutans and Actinomyces viscosus that adhered to the surface of the resin and the zinc phosphate cement material disks was the maximum. The number of Porphyromonas gingivalis and Enterococcus faecalis adhering to the surface of the AH Plus sealer block was the maximum. Streptococcus mutans and Actinomyces viscosus exhibited the strongest adhesion ability to the resin and the zinc phosphate cement material block. Porphyromonas gingivalis and Enterococcus faecalis showed the highest adhesion ability to the AH Plus sealer block.