In this paper, we investigate twoatom entanglement in time evolution and the thermal entanglement in a generalized JaynesCummings model by means of concurrence. The result shows that the twoatom entangled state appears with periodicity, which decreases with increasing dipoledipole coupling between the two atoms. In a finite temperature, the concurrence decreases with increasing temperature, and the thermal entanglement vanishes in this JaynesCummings model when the system temperature reaches the critical temperature, which is proportional to the dipoledipole coupling strength of the two atoms. For typical experimental data, the critical temperature is on the order of 10-5K. In addition, there exists the quantum phase transition in this JaynesCummings model