SARS-CoV-2 continues to pose a threat to public health. Main protease (Mpro) is one of the most lucrative drug targets for developing specific antivirals against SARS-CoV-2 infection. By targeting Mpro, peptidomimetic nirmatrelvir is able to inhibit viral replication of SARS-CoV-2 and reduce the risk for progression to severe COVID-19. However, multiple mutations in the gene encoding Mpro of emerging SARS-CoV-2 variants raise a concern of drug resistance. In the present study, we expressed 16 previously reported SARS-CoV-2 Mpro mutants (G15S, T25I, T45I, S46F, S46P, D48N, M49I, L50F, L89F, K90R, P132H, N142S, V186F, R188K, T190I, and A191V). We evaluated the inhibition potency of nirmatrelvir against these Mpro mutants and solved the crystal structures of representative Mpro mutants of SARS-CoV-2 bound to nirmatrelvir. Enzymatic inhibition assays revealed that these Mpro variants remain susceptible to nirmatrelvir as the wildtype. Detailed analysis and structural comparison provided the inhibition mechanism of Mpro mutants by nirmatrelvir. These results informed the ongoing genomic surveillance of drug resistance of emerging SARS-CoV-2 variants to nirmatrelvir and facilitate the development of next-generation anticoronavirus drugs.