Background: The effect of metformin on primary bone cancer risk has not been researched. This retrospective cohort study investigated the risk of primary bone cancer between metformin initiators and non-metformin initiators in patients with type 2 diabetes mellitus. Methods: A total of 673,532 patients with newly diagnosed type 2 diabetes mellitus and had been prescribed antidiabetic drugs for 2 or more times during 1999–2009 were enrolled from Taiwan's National Health Insurance. Metformin initiators and non-metformin initiators were defined according to the prescriptions of antidiabetic drugs within the initial 12 months. The patients were then followed up until December 31, 2011 for the incidence of primary bone cancer. Cox regression incorporated with the inverse probability of treatment-weighting using propensity scores was used to estimate hazard ratios in intention-to-treat and per-protocol analyses. Results: In the intention-to-treat analysis, the respective incidence rates were 10.56 and 12.90 per 100,000 person-years in 453,532 metformin initiators and 220,000 non-metformin initiators and the hazard ratio for initiators versus non-initiators was 0.830 (95% confidence interval 0.686–1.004, P-value = 0.0551). In the per-protocol analysis, the incidence rates were 7.58 and 11.77 per 100,000 person-years, respectively, and the hazard ratio was 0.615 (95% confidence interval 0.468–0.808, P-value = 0.0005). Subgroup analyses with regards to sex and age (<60 and ≥60 years) showed that the significantly lower risk associated with metformin use was only observed in men aged ≥60 years in the per-protocol analysis. Conclusions: A significantly lower risk of primary bone cancer can be observed in patients with type 2 diabetes mellitus who adhere to metformin treatment. This benefit can only be observed in men aged ≥60 years.