The usual molecular dynamics (MD) simulation adopts a non-liner term (friction force) in the equation of motion to control the system temperature. Since such equation of motion is similar to the van der Pol equation, the synchronization motion could be induced by the particle interactions in some cases. In this study, we carried out the MD simulations of the model diatomic molecules in the gas and solution systems to investigate a possible synchronization phenomenon of molecules. The synchronization of vibrational motions of two diatomic molecules was observed in the gas system when the system temperature was controlled by thermostat. In the case of solution system, the synchronization of two molecules was found to depend on the density of solvent particles. These findings indicate that the synchronization of vibrational motion should be induced by the thermostat and the molecular interaction with surrounding solvent and solute molecules.