This paper aims at solving the optimal control problem of the dynamic of HBV infection under treatment using the perturbation iteration method. This method serves as a tool to determine the approximate solutions of nonlinear equations for which exact solutions cannot be obtained. To test the efficacy of this method, the authors propose to compare the numerical simulation results with those of the direct method and fuzzy logic strategy. The newly used method for solving the above optimal control problem is very important since the findings compared to those obtained from the two other methods are in good agreement with experimental data and they demonstrate the response drugs to the dynamics of uninfected hepatocytes, infected hepatocytes, and free virions for a patient suffering from HBV. Since the perturbation iteration method provides satisfactory results which are close to other used numerical methods, it is an important numerical tool to determine the solution of an optimal control problem. In particular, it provides optimal trajectories in medicine, biology, and other related scientific fields. For instance, the response of treatment as control of the human body ensures the health of patients.