Disclosed are a toothpaste with antibacterial and bacteriostatic effects for adjusting oral flora and a preparation method of toothpaste. The toothpaste comprises the following components in percentage by weight: 16%-35% of an abrasive agent, 10%-25% of a thickening agent, 0.2%-0.6% of a preservative, 2.6%-3.6% of a surfactant, 0.22%-0.38% of a sweetening agent, 22%-37% of a humectant, 0.4%-0.8% of an adhesive, 0.4%-1.7% of a stabilizer, 0.45%-0.8% of a flavoring agent, 5%-12% of hand sanitizer extract, 3%-5% of coconut shell charcoal powder and the balance deionized water. According to the toothpaste disclosed by the invention, by adding the gynura divaricata extract into the components, the gynura divaricata extract is a pure natural plant extract, is very safe to a human body, has antibacterial, bacteriostatic and anti-inflammatory effects, not only has common cleaning and tooth-protecting capabilities, but also has a remarkable inhibition effect on oral bacteria, and is convenient to use.