Since the emergence of a novel coronavirus disease 2019 (COVID-19) caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) was first reported from Wuhan, China, neither a specific vaccine nor an antiviral drug against SARS-CoV-2 has become available. However, a combination of two HIV-1 protease inhibitors, lopinavir and ritonavir, has been found to be effective against SARS-CoV, and both drugs could bind well to the SARS-CoV 3C-like protease (SARS-CoV 3CLpro). In this work, molecular complexation between each inhibitor and SARS-CoV-2 3CLpro was studied using all-atom molecular dynamics simulations, free energy calculations, and pair interaction energy analyses based on MM/PB(GB)SA and FMO-MP2/PCM/6-31G* methods. Both anti-HIV drugs interacted well with the residues at the active site of SARS-CoV-2 3CLpro. Ritonavir showed a somewhat higher number atomic contacts, a somewhat higher binding efficiency, and a somewhat higher number of key binding residues compared to lopinavir, which correspond with the slightly lower water accessibility at the 3CLpro active site. In addition, only ritonavir could interact with the oxyanion hole residues N142 and G143 via the formation of two hydrogen bonds. The interactions in terms of electrostatics, dispersion, and charge transfer played an important role in the drug binding. The obtained results demonstrated how repurposed anti-HIV drugs could be used to combat COVID-19.