Osteoporosis is a negative balance of bone metabolism caused by the lower bone formation of osteoblasts than the bone absorption of osteoclasts. Ferroptosis plays an important role in osteoporosis, but its effects on osteoblasts and osteoclasts are still unclear. First, we compared the osteogenic differentiation potential of MSCs and osteoclast differentiation potential of monocytes between osteoporosis mice and control. Then, we obtained gene expression profiles of MSCs and monocytes, and screened differentially expressed genes for enrichment analysis. Next, we cluster the patients with osteoporosis according to genes related to osteogenesis inhibition and osteoclast promotion. Finally, according to the expression of different subtypes of ferroptosis genes, diagnostic markers were screened and verified. The osteogenic differentiation ability of MSCs in osteoporosis mice was decreased, while the osteoclast differentiation ability of monocytes was enhanced. The DEGs of MSCs are enriched in iron ion, oxygen binding and cytokine activity, while the DEGs of monocytes are enriched in iron ion transmembrane transport and ferroptosis. Compared with the osteogenic inhibition subtype, the osteoclast promoting subtype has a higher correlation with ferroptosis, and its functions are enriched in fatty acids, reactive oxygen species metabolism and oxidoreductase activity of metal ions. SLC40A1 may be the hub gene of ferroptosis in osteoporosis by promoting osteoclast differentiation. Ferroptosis may inhibit bone formation and promote bone absorption through oxidative stress, thus leading to osteoporosis. The study of ferroptosis on osteoblasts and osteoclasts provides a new idea for the diagnosis and treatment of osteoporosis.