The stability and optimal control for an SIS epidemic model with demographics and heterogeneous control strategies (immunization and quarantine) on complex networks are investigated. The epidemic threshold, disease-free and endemic equilibria are derived. Then, global asymptotical stability about the two equilibria are studied based on different methods. Furthermore, the optimal control issue about the system is also considered. We obtain the existence and uniqueness of the optimal control and optimal control tactics. Some numerical simulations were conducted to illustrate and supplement the theoretical results. Meanwhile, the effects of the combination of various immunization and quarantine schemes are studied and also compared with the optimal control strategies.