In this paper, we use the quantum renormalization group method to study the quantum entanglement and phase transitions of the XY system with the transverse magnetic field and discuss the relations between the entanglement and the magnetic field B, the anisotropy parameter (gamma ), and particle number N. The quantum phase transition point of the system can be found through the strange behavior entangled at a certain point, and the relationship between the entanglement and the critical exponent of the correlation length can also be found. The results show that when the magnetic field is fixed, there is a maximum value of entanglement at the critical point (gamma =0), and with the increase of the number of iterations, the maximum value of entanglement gradually increases and approaches one. In addition, we find that (gamma ) has an inhibiting effect on entanglement, and B has a promoting effect on entanglement. At the thermodynamic limit, entanglement exists only at the critical point, in the region where (gamma ne 0), the system corresponds to the Ising-like phase, and at (gamma =0), it corresponds to the spin liquid phase. By studying the entanglement derivatives, we also find that there are two extreme values of the first derivative, and with the increase of the number of iterations, the extreme point gradually approaches the critical point. The first derivative of the entanglement exhibits a nonanalytic behavior at the critical point, indicating that the system has a second-order phase transition. Finally, the scaling behavior of entanglement at the critical point is detected, and the critical exponent of entanglement equals one.