Osteoporosis is a global health problem, and it is of great significance to replace the drugs with natural functional factors. In this study, we investigated the antiosteoporotic activity of lipids prepared from Tilapia nilotica fish head lipids (THLs) in the ovariectomized osteoporosis rats. THLs are composed of neutral lipids (NL, 77.84%), phospholipids (PL, 11.86%), and glycolipids (GL, 6.47%). There were apparent differences in the fatty acid composition of disparate components, and PL contains the most abundant Ω-3 polyunsaturated fatty acids. The results proved that THLs could improve bone microstructure, increase bone mineral density, and decrease bone resorption. To illustrate the antiosteoporotic mechanism, we analyzed the changes in gut microbial communities, proinflammation factors, serum metabolites, and metabolic pathways. Further study on gut microbiota showed that THLs significantly decreased the content of Alistipes in the gut and dramatically increased the beneficial bacteria such as Oscillospira, Roseburia, and Dubosiella. Meanwhile, proinflammation factors of serum in OVX rats decreased significantly, and metabolites were changed. Therefore, we speculated that THLs improved bone loss through reducing inflammation and changing the metabolites and metabolic pathways such as arachidonic acid metabolism and primary bile acid metabolism, etc., by altering gut microbiota. The results indicated that THLs could be a functional factor with antiosteoporotic activity.