It is important to understand the mechanical properties of diamond-like carbon (DLC) for use not only in frictionand wear-resistant coatings, but also in vibration reduction and damping increase at the layer interfaces. However, the mechanical properties of DLC are influenced by the working temperature and its density, and the applications of DLC as coatings are limited. In this work, we systematically studied the deformation behaviors of DLC under different temperatures and densities using compression and tensile testing of DLC by molecular dynamics (MD) methods. In our simulation results, the values of tensile stress and compressive stress decreased and tensile strain and compressive strain increased as the temperature increased from 300 K to 900 K during both tensile and compressive processes, indicating that the tensile stress and tensile strain depend on the temperature. During the tensile simulation, Young’s modulus of DLC models with different densities had a different sensitivity to the increase in temperature, and the DLC model with a high density was more sensitive than that with a low density, which was not seen in the compression process. We conclude that the Csp3-Csp2 transition leads to tensile deformation, while the Csp2-Csp3 transition and relative slip dominate compressive deformation.