In this study, we investigate entanglement in a two mixed-spin (1/2,1) XY Heisenberg spin system under an applied magnetic field by considering the long-range interaction with an inverse-square function. The spin-spin coupling constant is considered as a function of the distance between spins. We also discuss the temperature and magnetic field dependence of the thermal entanglement in this system for this interaction. The numerical results show that, in the presence of the long-range interaction, thermal entanglement between spins has a rich behavior dependent upon the interaction strength, temperature and magnetic field. We find that for less than a critical distance there are entanglement plateaus dependent upon the distance between spins, whereas above the critical distance the entanglement can exhibit sudden death.