When COVID-19 was raging around the world, people were more fearful and anxious. In this context, the media should uphold impartiality and shoulder the responsibility of eliminating misinformation. Therefore, our research adopted sentiment analysis technologies to analyze the impartiality of news agencies and analyzed the factors that affect the impartiality of COVID-19-related articles about various countries. The SentiWordNet3.0 and bidirectional encoder representations from transformers (BERT) models were employed to analyze the articles and visualize the data. The following conclusions were redrawn in our research. During the pandemic, articles of some news agencies were not objective; the impartiality of news agencies was related to the reliability of news agencies instead of the bias of news agencies; there were obvious differences in the coverage and positivity of international news agencies to report the performance of COVID-19 prevention and control in different countries.