The COVID-19 pandemic has emphasized the urgency for effective antiviral therapies against SARS-CoV-2. Targeting the main protease (3CLpro) of the virus has emerged as a promising approach, and nirmatrelvir (PF-07321332), the active component of Pfizer's oral drug Paxlovid, has demonstrated remarkable clinical efficacy. However, the emergence of resistance mutations poses a challenge to its continued success. In this study, we employed alchemical free energy perturbation (FEP) alanine scanning to identify nirmatrelvir-resistance mutations within SARS-CoV-2 3CLpro. FEP identified several mutations, which were validated through in vitro IC 50 experiments and found to result in 8-and 72-fold increases in nirmatrelvir IC 50 values. Additionally, we constructed SARS-CoV-2 omicron replicons containing these mutations, and one of the mutants (S144A/E166A) displayed a 20-fold increase in EC 50 , confirming the role of FEP in identifying drug-resistance mutations. Our findings suggest that FEP can be a valuable tool in proactively monitoring the emergence of resistant strains and guiding the design of future inhibitors with reduced susceptibility to drug resistance. As nirmatrelvir is currently widely used for treating COVID-19, this research has important implications for surveillance efforts and antiviral development.