In this work, we analyze a mathematical epidemic model with vaccination. We assumed the vaccination has done on newborns and populations of susceptible individuals who have not vaccinated. We also study the model with medical treatment as a control variable. From the model without control, we show that the model has two equilibria, namely the disease-free equilibrium and endemic equilibrium. The local stability of the equilibrium and the existence of the endemic equilibrium depend on the basic reproduction number. Thus, the optimal control problem is solved by using Pontryagin's Maximum Principle. The simulation results show that the implementation of the cure treatment as a control variable can reduce the number of exposed and infectious by 99.99% in 20th year after the intervention.