Lipoteichoic acid (LTA) and lipopolysaccharide (LPS) are cell wall components of Gram-positive and Gram-negative bacteria, respectively. Notably, oral microflora consists of a variety of bacterial species, and osteomyelitis of the jaw caused by dental infection presents with symptoms of bone resorption and osteosclerosis. However, the effects of LTA and LPS on osteogenic differentiation have not yet been clarified. We examined the effects of LTA and LPS on osteoblasts and found that LTA alone promoted alizarin red staining at low concentrations and inhibited it at high concentrations. Additionally, gene expression of osteogenic markers (ALP, OCN, and OPG) were enhanced at low concentrations of LTA. High concentrations of LPS suppressed calcification potential, and the addition of low concentrations of LTA inhibited calcification suppression, restoring the gene expression levels of suppressed bone differentiation markers (ALP, BSP, and OCN). Moreover, the suppression of p38, a signaling pathway associated with bone differentiation, had opposing effects on gene-level expression of tumor necrosis factor-α (TNF-α) and interleukin-6 (IL-6), suggesting that mixed LTA and LPS infections have opposite effects on bone differentiation through concentration gradients, involving inflammatory markers (TNF-α and IL-6) and the p38 pathway.