B-phycoerythrin (B-PE), a pigment protein, has found extensive applications in the food, pharmaceutical, and cosmetic industries. However, the effects and potential mechanisms of B-PE on colitis and colitis-associated bone loss remain unclear. Thus, the aim of this study was to investigate the pharmacological mechanisms of B-PE against colitis and colitis-associated bone loss using network pharmacology analysis, molecular docking, and experimental validation. Based on public databases, 99 common targets of B-PE against inflammatory bowel disease and osteoporosis were predicted. The protein-protein interaction network identified 16 core targets, including TNF, AKT1, EGFR, etc., as hub targets. Additionally, functional enrichment analyses and molecular docking results revealed that the PI3K/AKT signaling pathway may serve as a potential signaling pathway for B-PE in the treatment of colitis and colitis-associated bone loss. Furthermore, pharmacological experiments indicated that B-PE not only reversed the elevated expression of TNF-α, IL-1β, MMP9, and CXCL8a, and the reduced expression of ZO-1, E-cadherin, COL1A1, and RUNX2 in the DSS-induced colitis zebrafish model, but also enhanced the phosphorylation of PI3K and AKT, thereby mitigating inflammatory response and promoting osteogenesis. In conclusion, this study provides a theoretical basis for considering B-PE as a promising candidate for the treatment of colitis and colitis-associated bone loss.