Mammalian stanniocalcin 2 (STC2) is a glycoprotein hormone with multiple functions. The present study determined the importance of STC2 in osteoblast differentiation. It was revealed that the expression of STC2 was increased during the differentiation of MC3T3-E1 cells to osteoblasts and that knockdown of STC2 reduced osteoblast differentiation and mineralization, whereas STC2 overexpression increased differentiation and mineralization. Knockdown of STC2 downregulated the expression of osteoblast-associated genes, including runt‑related transcription factor 2, collagen type I α 1 chain, osterix and osteocalcin. Overexpression of STC2 upregulated the expression of these osteoblastic genes. In addition, overexpression of STC2 enhanced the phosphorylation of extracellular signal‑regulated kinase 1/2 (ERK1/2), whereas inhibition of ERK phosphorylation reduced osteoblast differentiation of MC3T3‑E1 cells overexpressing STC2. These findings indicated that STC2 may promote osteoblast differentiation and mineralization by regulating ERK activation.