The outbreak of a novel coronavirus, which was later formally named the severe acute respiratory coronavirus 2 (SARS-CoV-2), has caused a worldwide public health crisis. Previous studies showed that SARS-CoV-2 is highly homologous to SARS-CoV and infects humans through the binding of the spike protein to ACE2. Here, we have systematically studied the molecular mechanisms of human infection with SARS-CoV-2 and SARS-CoV by protein-protein docking and MD simulations. It was found that SARS-CoV-2 binds ACE2 with a higher affinity than SARS-CoV, which may partly explain that SARS-CoV-2 is much more infectious than SARS-CoV. In addition, the spike protein of SARS-CoV-2 has a significantly lower free energy than that of SARS-CoV, suggesting that SARS-CoV-2 is more stable and may survive a higher temperature than SARS-CoV. This provides insights into the evolution of SARS-CoV-2 because SARS-like coronaviruses have originated in bats. Our computation also suggested that the RBD-ACE2 binding for SARS-CoV-2 is much more temperature-sensitive than that for SARS-CoV. Thus, it is expected that SARS-CoV-2 would decrease its infection ability much faster than SARS-CoV when the temperature rises. These findings would be beneficial for the disease prevention and drug/vaccine development of SARS-CoV-2.