Herd immunity achieved through mass vaccination is an effective approach to prevent contagious diseases. Nonetheless, emerging SARS-CoV-2 variants with frequent mutations largely evaded humoral immunity induced by Spike-based COVID-19 vaccines. Herein, we develop a lipid nanoparticle (LNP)-formulated mRNA-based T-cell-inducing antigen, which targeted three SARS-CoV-2 proteome regions that enriched human HLA-I epitopes (HLA-EPs). Immunization of HLA-EPs induces potent cellular responses to prevent SARS-CoV-2 infection in humanized HLA-A*02:01/DR1 and HLA-A*11:01/DR1 transgenic mice. Of note, the sequences of HLA-EPs are highly conserved among SARS-CoV-2 variants of concern. In humanized HLA-transgenic mice and female rhesus macaques, dual immunization with the LNP-formulated mRNAs encoding HLA-EPs and the receptor-binding domain of the SARS-CoV-2 B.1.351 variant (RBDbeta) is more efficacious in preventing infection of SARS-CoV-2 Beta and Omicron BA.1 variants than single immunization of LNP-RBDbeta. This study demonstrates the necessity to strengthen the vaccine effectiveness by comprehensively stimulating both humoral and cellular responses, thereby offering insight for optimizing the design of COVID-19 vaccines.