Introduction: The COVID-19 pandemic has affected every country and changed people's lives. Accurate prediction of COVID-19 trends can help prevent the further spread of the outbreak. However, the changing environment affects the COVID-19 prediction performance, and previous models are limited in practical applications. Methods: An explainable multichannel deep learning model with spatial, temporal and environmental channels for time series prediction, STE-COVIDNet, was proposed. The time series data of COVID-19 infection, weather, in-state population mobility, and vaccination were collected from May, 2020, to October, 2021, in the USA. In the environmental channel of STE-COVIDNet, an attention mechanism was applied to extract significant environmental factors related to the spread of COVID-19. In addition, the attention weights of these factors were analyzed with the actual situation. Results: STE-COVIDNet was found to be superior to other advanced prediction models of COVID-19 infection cases. The analysis results of attention weight were reported to be consistent with existing studies and reports. It was found that the same environmental factors that influence the spread of COVID-19 can vary across time and region, which explains why findings of previous studies on the relationship between the environment and COVID-19 vary by region and time. Conclusion: STE-COVIDNet is an explainable model that can adapt to environmental changes and thus improve predictive performance.