This article discusses a model of spreading typhoid fever with direct and indirect transmissions. There are five compartments included in the model, namely susceptible individuals, infected individuals, chronic carrier individuals, recovered individuals, and salmonella typhi bacteria in the environment. As an effort to control and minimize the numbers of infected individuals and chronic carrier individuals, we introduce simultaneously campaign for the susceptible individuals and treatment for the infected individuals and for chronic carrier individuals. The resulting model is a system of non-linear differential equations and quite challenging to analysis globally. Existence of both disease-free equilibrium point and endemic equilibrium point are analysed analytically. Stability of the equilibrium point is analysed locally by determining the eigenvalues of the associated Jacobian matrix, Routh-Hurwitz stability criteria, and basic reproduction number () via next generation matrix. The minimum Pontryagin principle and Hamiltonian equation are referred to minimize the numbers of infected and chronic carrier individuals. Simulation is carried out using suitable values of parameters. We found that the eigenvalues for endemic equilibrium point are all negative real numbers and . Optimal paths for state and constate variables are plotted using fourth order forward-backward Runge-Kutta method. In case there are no campaign and treatments, we found and endemic occurs. When campaign and treatments are included together in the model, we found optimal paths for all compartments that minimize the number of infected and chronic carrier individuals. Giving campaign and treatments increase significantly the susceptible and recovered individuals. At the same time, it reduces significantly the infected, chronic carrier individuals, and salmonella typhi bacteria in the environment. Involving campaign and treatment in the model of spreading typhoid fever can be considered as an effective strategy to minimize the numbers of infected and chronic carrier individuals.