As a mussel-inspired polymer, polydopamine (PDA) coating can be used as a simple and universal way to form nano-hydroxyapatite (nHAP) crystals on a variety of substrates. Therefore, PDA is widely used in the preparation of bone repair materials. However, its uneven distribution and easy degradation under strongly alkaline conditions limit its application. Therefore, based on the principle of in situ regeneration, this study combined the freeze-drying technology with the diffusion method of ammonium carbonate to bionics construct porous micro-nano composite scaffolds. Chitosan (CS) and dopamine hydrochloride (DA) were used as the chief components to form a multilayer layered scaffold structure. PDA and nHAP grow in situ on the surface of the freeze-dried scaffolds after ammonium carbonate gas diffusion treatment and Tris buffer immersion. The mild synthesis method effectively avoided the decomposition of PDA, and the gas diffusion method promoted the uniform distribution of PDA. The effect of PDA on nHAP formation was studied by adjusting the amount of DA. The cross-linking reaction between PDA and CS was verified by FTIR and XPS. Surface morphology was observed by SEM. The formation of nHAP was confirmed by XRD. The scaffolds had good porosity, degradation, water absorption, thermal stability and biomimetic mineralization properties. Cell experiments showed that the scaffolds had good biocompatibility and had no toxicity to cells. The construction of bone defect animal model further verified that the scaffolds promoted bone regeneration in the defect site of the body. This study provided a new idea and method for the preparation of bone repair scaffolds.