The coronavirus disease 2019 (COVID-19) is an infectious disease that mainly affects the host respiratory system with ~ 80% asymptomatic or mild cases and ~ 5% severe cases. Recent genome-wide association studies (GWAS) have identified several genetic loci associated with the severe COVID-19 symptoms. Delineating the genetic variants and genes is important for better understanding its biological mechanisms. We implemented integrative approaches, including transcriptome-wide association studies (TWAS), colocalization analysis, and functional element prediction analysis, to interpret the genetic risks using two independent GWAS datasets in lung and immune cells. To understand the context-specific molecular alteration, we further performed deep learning-based single-cell transcriptomic analyses on a bronchoalveolar lavage fluid (BALF) dataset from moderate and severe COVID-19 patients. We discovered and replicated the genetically regulated expression of CXCR6 and CCR9 genes. These two genes have a protective effect on lung, and a risk effect on whole blood, respectively. The colocalization analysis of GWAS and cis-expression quantitative trait loci highlighted the regulatory effect on CXCR6 expression in lung and immune cells. In the lung-resident memory CD8+ T (TRM) cells, we found a 2.24-fold decrease of cell proportion among CD8+ T cells and lower expression of CXCR6 in the severe patients than moderate patients. Pro-inflammatory transcriptional programs were highlighted in the TRM cellular trajectory from moderate to severe patients. CXCR6 from the 3p21.31 locus is associated with severe COVID-19. CXCR6 tends to have a lower expression in lung TRM cells of severe patients, which aligns with the protective effect of CXCR6 from TWAS analysis.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00439-021-02305-z.