The glutamatergic signaling pathway, which is mediated by N‐methyl‐D‐aspartate (NMDA) receptors, is crucial for osteoblast differentiation and bone function. Dextromethorphan (DXM), a widely used antitussive, is a noncompetitive antagonist of the NMDA receptor. However, the effects of DXM on osteoblast and bone regeneration remain unclear. The present study investigated the effects of DXM on osteogenesis in vitro and in vivo. A MC3T3‐E1 preosteoblast cell line was treated with varying concentrations of DXM. Real‐time‐quantitative polymerase chain reaction (RT‐qPCR) and Western‐blot analysis were performed to evaluate the expression of osteogenesis‐related runt‐related transcription factor 2 (RUNX2), osterix (OSX), osteocalcin (OCN), collagen type 1α (Col‐1α), and alkaline phosphatase (ALP) after DXM treatment. Zebrafish embryos were incubated with DXM, which had potential to affect the ossification of the vertebrae and skull, and analyzed using calcein staining. Furthermore, we used a rat calvarial defect model to assess the effects of DXM on bone regeneration by using microcomputed tomography. The results indicate that DXM inhibited extracellular mineralization, ALP activity, and the expression of osteogenic markers, namely RUNX2, OSX, OCN, Col‐1α, and ALP, in MC3T3‐E1 cells. DXM suppressed skeleton ossification in zebrafish and affected bone regeneration in rats with calvarial defects. However, the mineral density of the regenerated bones did not differ significantly between the DXM and control groups. The present study demonstrated that DXM negatively affects the osteogenic function of osteoblasts, leading to impaired skeletal development and bone regeneration. Thus, clinicians should consider the negative effects of DXM on bone regeneration.