COVID-19, caused by SARS-CoV-2, is a highly contagious disease with significant transmissibility and pathogenicity. The main protease of SARS-CoV-2 (Mpro or 3CLpro) is crucial for viral replication, making it a key therapeutic target. Nirmatrelvir, a promising Mpro inhibitor, contains a trifluoroacetyl group in its P4 fragment, which presents opportunities for further optimization. This study aims to enhance the inhibitory activity of nirmatrelvir through structural modification of the P4 fragment. Using a computer-aided drug design (CADD) approach, 11 novel compounds were identified based on molecular docking scores, binding free energy, predicted ADMET properties, structural diversity, synthetic feasibility, and inhibitory activity. IC50 measurements and molecular dynamics (MD) simulations demonstrated significant inhibitory potential for most compounds, with IC50 values ranging from 0.0435-0.9989 μM. Notably, compounds 2-5a and 2-5f exhibited inhibitory activity against SARS-CoV-2 Mpro comparable to that of nirmatrelvir. These findings offer valuable insights for the development of anti-SARS-CoV-2 therapeutics.