Osteoporosis, characterized by bone metabolism disruption leading to gradual bone loss and increased fracture susceptibility, is linked to the excessive activation of osteoclasts. Pseudolaric acid B (PAB), identified as an NF-κB signaling inhibitor crucial for osteoclastogenesis, is explored here for its protective effects in osteoporosis. Noncytotoxic PAB's impact on osteoclast differentiation was assessed through cell viability and osteoclast formation assays, with subsequent testing of osteoclast function via bone resorption assays. Quantitative real-time polymerase chain reaction evaluated PAB's genetic-level impact on osteoclastogenesis. Network pharmacology, western blot, and luciferase reporter gene assays were employed to elucidate PAB's regulatory mechanism. In an in vivo model of osteoporosis induced by ovariectomy (OVX) in mice, micro-CT, H&E staining, and TRAP staining facilitated histomorphometry analysis, while flow cytometry verified macrophage polarization. PAB demonstrated inhibitory effects on osteoclast formation and bone resorption in BMM and RAW264.7 cells, suppressing osteoclast-specific genes. Bioinformatic analysis, western blot, and luciferase assay results indicated PAB's inhibition of IκBα phosphorylation in the NF-κB signaling pathway and ERK in MAPKs, elucidating its mechanism. In vivo experiments confirmed PAB's attenuation of osteoporosis by reducing osteoclast formation in OVX mice. PAB further facilitated macrophage conversion from M1 to M2 and suppressed IL-1β, TNF-α, and IL-6 synthesis. In conclusion, PAB prevents osteoporosis by inhibiting RANKL-induced osteoclastogenesis through NF-κB and ERK signaling pathway suppression, coupled with macrophage polarization. These findings indicate the potential therapeutic role of PAB in osteoporosis.