Objective To investigate the causal associations and mediating effect of immune cell phenotypes, plasma metabolite phenotypes, and osteoporosis. Methods A two‑sample Mendelian randomization (MR) study design was adopted, using summary‑level data from genome‑wide association studies (GWAS), in which a total of 731 immune cell phenotypes, 1 400 plasma metabolite phenotypes, and osteoporosis data from the FinnGen R12 database were included. Independent single‑nucleotide polymorphisms (SNPs) meeting the criteria were selected as instrumental variables. The inverse‑variance weighted (IVW) method was used as the primary analytical approach, supplemented by MR‑Egger regression, weighted median estimator, weighted mode, and simple mode methods to estimate causal effects; heterogeneity tests, horizontal pleiotropy tests, leave‑one‑out sensitivity analysis, and reverse MR were performed to validate the robustness of the results. Mediating effect analysis was conducted via the product‑of‑coefficients method combined with the Delta method. Results (1) Forward MR analysis: Results from IVW analysis indicated that 4 immune cell phenotypes—percentage of CD8+ high-expression cell subsets that were CD28-negative and strongly CD25-positive among all CD8+ high‑expression cell populations (CD28-CD25++CD8br%CD8br), side scatter area of T cells, expression level of CD80 on the surface of plasmacytoid dendritic cells, absolute count of CD28-negative double-negative T cells (CD4-negative, CD8-negative)—and 8 plasma metabolite phenotypes (7‑methylxanthine level, sphingomyelin level, N‑acetylglucosamine/N‑acetylgalactosamine level, tricosanoyl sphingomyelin level, ethyl‑β‑D‑glucopyranoside level, 12,13‑dihydroxy-9-octadecenoic acid [12,13‑diHOME] level, X‑23739 level, and the phosphoric acid‑to‑threonine ratio) showed statistically significant causal associations with osteoporosis (all P<0.01). No statistically significant horizontal pleiotropy (MR‑Egger regression intercept test showed all P>0.05) or heterogeneity (Cochran's Q test showed all P>0.05) was detected. Leave-one-out sensitivity analysis showed no significant fluctuations in the overall effect estimates after removing any single SNP. (2) Reverse MR analysis: No reverse causal effect of osteoporosis on immune cell phenotypes was observed (all 5 MR methods showed P>0.05). (3) Mediating effect analysis revealed that 12,13‑diHOME levels partially mediated the causal pathway from CD28-CD25++CD8br%CD8br to osteoporosis (all three associations were positive), with a mediating effect value of 0.015 (P=0.012), accounting for 12.88% of the total effect. Conclusion Multiple immune cell phenotypes and plasma metabolite phenotypes are causally associated with osteoporosis. Among them, CD28-CD25++CD8br%CD8br may partially mediate an increased risk of osteoporosis through upregulating plasma 12,13‑diHOME levels.