The outbreak of COVID-19 (coronavirus disease 2019) has generated a large amount of spatiotemporal data. Using a knowledge graph can help to analyze the transmission relationship between cases and locate the transmission path of the pandemic, but researchers have paid little attention to the spatial relationships between geographical entities related to the pandemic. Therefore, we propose a method for constructing a pandemic situation knowledge graph of COVID-19 that considers spatial relationships. First, we created an ontology design of the pandemic data in which spatial relationships are considered. We then constructed a non-spatial relationships extraction model based on BERT and a spatial relationships extraction model based on spatial analysis theory. Second, taking the pandemic and geographic data of Guangzhou as an example, we modeled a pandemic corpus. We extracted entities and relationships based on this model, and we constructed a pandemic situation knowledge graph that considers spatial relationships. Finally, we verified the feasibility of using this method as a visualization exploratory tool in the analysis of spatial characteristics, pandemic development situation, case sources, and case relationships analysis of pandemic-related areas.