It is of significance to construct the immunomodulatory and osteogenic microenvironment for three dimension (3D) regeneration of bone tissues. 3D scaffolds, with various chemical composition, macroporous structure and surface characteristics offer a beneficial microenvironment for bone tissue regeneration. However, there is a gap between the well-ordered surface microstructure of bioceramic scaffolds and immune microenvironment for bone regeneration. In this study, a gear-inspired 3D scaffold with well-ordered surface microstructure was successfully prepared through a modified extrusion-based 3D printing strategy for immunomodulation and bone regeneration. The prepared gear-inspired scaffolds could induce M2 phenotype polarization of macrophages and further promoted osteogenic differentiation of bone mesenchymal stem cells in vitro. The subsequent in vivo study demonstrated that the gear-inspired scaffolds were able to attenuate inflammation and further promote new bone formation. The study develops a facile strategy to construct well-ordered surface microstructure which plays a key role in 3D immunomodulatory and osteogenic microenvironment for bone tissue engineering and regenerative medicine. STATEMENT OF SIGNIFICANCE.