Studies have shown that the co-infection of Human Immunodeficiency Virus (HIV) and Hepatitis B Virus (HBV) poses a major threat to the public health due to their combined negative impacts on health and increased risk of complications. Even though, some scholars formulated and analyzed the HBV and HIV co-infection model they did not consider the compartment that contains protected individuals against both HBV and HIV infections. They incorporated the optimal control theory and cost-effectiveness analysis simultaneously. With this in mind, we are motivated to formulate and analyze the HBV and HIV co-infection model, considering the protected group and incorporating optimal control theory and cost-effectiveness. In this study, we have theoretically computed all of the models disease-free equilibrium points, all the models effective reproduction numbers and unique endemic equilibrium points. The two sub-models disease-free equilibrium points are locally as well as globally asymptotically stable whenever their associated effective reproduction numbers are less than one. We reformulated the optimal control problem by incorporating five time-dependent control measures and conducted its theoretical analysis by utilizing the Pontryagin's maximum principle. Using the fourth order Runge–Kutta numerical method and MATLAB ODE45, we performed the numerical simulations with various combinations of control efforts to verify the theoretical results and investigate the impacts of the suggested protection and treatment control strategies for both the HBV and HIV diseases. Also, we carried out a cost-effectiveness analysis of the proposed control strategies. Eventually, we compared our model results with other researcher similar model results whenever cost-effectiveness analysis is not carried out the findings of this particular study suggest that implementing each of the proposed control strategies simultaneously has a high potential to reduce and control the spread of HBV and HIV co-infections in the community. According to the cost-effectiveness analysis, implementing the HBV treatment and the HIV and HBV co-infection treatment measures has a high potential effect on reducing and controlling the HBV and HIV co-infection transmission problem in the community.