Coronavirus disease 2019 (COVID‐19) is a global epidemic disease caused by a novel virus, severe acute respiratory syndrome coronavirus 2 (SARS‐CoV‐2), causing serious adverse effects on human health. In this study, we obtained a blood leukocytes sequencing data set of COVID‐19 patients from the GEO database and obtained differentially expressed genes (DEGs). We further analyzed these DEGs by protein–protein interaction analysis and Gene Ontology enrichment analysis and identified the DEGs closely related to SARS‐CoV‐2 infection. Then, we constructed a six‐gene model (comprising
IFIT3, OASL, USP18, XAF1, IFI27
, and
EPSTI1
) by logistic regression analysis and calculated the area under the ROC curve (AUC) for the diagnosis of COVID‐19. The AUC values of the training group, testing group, and entire group were 0.930, 0.914, and 0.921, respectively. The six genes were highly expressed in patients with COVID‐19 and positively correlated with the expression of SARS‐CoV‐2 invasion‐related genes (
ACE2, TMPRSS2, CTSB
, and
CTSL
). The risk score calculated by this model was also positively correlated with the expression of
TMPRSS2, CTSB
, and
CTSL
, indicating that the six genes were closely related to SARS‐CoV‐2 infection. In conclusion, we comprehensively analyzed the functions of DEGs in the blood leukocytes of patients with COVID‐19 and constructed a six‐gene model that may contribute to the development of new diagnostic and therapeutic ideas for COVID‐19. Moreover, these six genes may be therapeutic targets for COVID‐19.