Acquired immunodeficiency syndrome (AIDS) has a serious impact on human health and life safety. In order to study its related factors, this paper establishes an HIV/AIDS model with treatment individuals based on heterosexual contact and male-to-male sexual contact. Using the method of next generation matrix, the threshold [Formula: see text] of the model is given. When [Formula: see text], it proves the global stability of the disease-free equilibrium. When [Formula: see text], it studies the dynamics of the boundary equilibrium and the endemic equilibrium under different conditions. Finally, through numerical simulations, the correctness of the theoretical results is verified. The key parameters affecting the spread of HIV are found through parameter sensitivity analysis, which provides a theoretical basis for effective control of the spread of HIV.