Osteoporosis is an age-related metabolic disease that results in limited bone regeneration capacity and excessive osteoclast activity. After arthroplasty in patients with osteoporosis, poor interface osseointegration resulting from insufficient bone regeneration ability often leads to catastrophic complications such as prosthesis displacement and loosening and periprosthetic fractures. In this study, we prepared a thermosensitive hydrogel loaded with bone morphogenetic protein-2 (BMP-2) to promote osteogenesis and osteoprotegerin (OPG) to inhibit excessive osteoclast activity. To construct three-dimensional (3D)-printed composite scaffolds for implantation, a hydrogel loaded with drugs was injected into porous Ti6Al4V scaffolds. The 3D-printed composite scaffolds showed good biocompatibility and sustained release of BMP-2 and OPG for more than 20 days. In vitro experiments indicated that composite scaffolds promoted osteogenic differentiation and reduced the osteoclastic activation simultaneously. Remarkably, immunofluorescence staining, micro-CT, histological, and biomechanical tests demonstrated that the sustained release of both BMP-2 and OPG from composite scaffolds significantly improved bone ingrowth and osseointegration in osteoporotic defects. In conclusion, this study demonstrated that the BMP-2- and OPG-loaded 3D-printed composite scaffolds can potentially promote osseointegration for osteoporotic patients after joint replacement.