The outbreak of viral pneumonia caused by the novel coronavirus SARS-CoV-2 that began in December 2019 caused high mortality. It has been suggested that the main protease (Mpro) of SARS-CoV-2 may be an important target to discover pharmaceutical compounds for the therapy of this life-threatening disease. Remdesivir, ritonavir and chloroquine have all been reported to play a role in suppressing SARS-CoV-2. Here, we applied a molecular docking method to study the binding stability of these drugs with SARS-CoV-2 Mpro. It appeared that the ligand-protein binding stability of the alliin and SARS-CoV-2 Mpro complex was better than others. The results suggested that alliin may serve as a good candidate as an inhibitor of SARS-CoV-2 Mpro. Therefore, the present research may provide some meaningful guidance for the prevention and treatment of SARS-CoV-2.