With an increasingly aging society, bone defects and fractures have become significant threats to human health and quality of life. Currently, autologous and allogeneic bone grafts remain the "gold standard" for the clinical treatment of bone repair. However, bone transplantation is still clinically insufficient, owing to its substantial limitations, such as graft rejection, donor functional defects, and risk of infection. Therefore, a variety of biomaterials have been developed to facilitate bone repair. With the advancement of bone tissue engineering, the focus of research has transitioned from bioinert to bioactive biomaterials. However, many biomaterials have not achieved satisfactory therapeutic effects. In recent years, advancements in osteoimmunology have revealed that the immune system, of which macrophages are critical components, plays an essential regulatory role in bone regeneration. In this review, the role of macrophages in bone healing is explored and recent developments in biomaterials that promote bone regeneration by modulating macrophage polarization and improving the osteoimmune microenvironment are reviewed. This review provides a reference for the development and clinical application of bone repair biomaterials from the immunomodulation perspective.