Chronic inflammation caused by persistent infections and metabolic disorders is thought to contribute to the increased cancer risk and the accelerated cancer progression. Oppositely, acute inflammation induced by bacteria-based vaccines or that is occurring after cancer selectively inhibits cancer progression and metastasis. However, the interaction between inflammation and cancer may be more complex than the current explanations for the relationship between chronic and acute inflammation and cancer. In this review, we described the impact of inflammation on cancer on the basis of three perspectives, including inflammation with different durations (chronic and acute inflammation), different scopes (systemic and local inflammation) and different occurrence sequences (inflammation occurring after and before cancer). In addition, we also introduced bacteria/virus-based cancer immunotherapies. We perceive that inflammation may be a double-edged sword with cancer-promoting and cancer-suppressing functions in certain cases. We expect to further improve the understanding of the relationship between inflammation and cancer and provide a theoretical basis for further research on their complex interaction.