Obtaining a safe and reliable scaffold that can be rapidly fabricated and used for clinical bone defect repairhas always been a challenge. In this study, polycaprolactone (PCL) composite scaffolds with various MXene(Ti2AlN) contents were prepared using 3D printing technology. The effects of different contents of Ti2AlNon the mechanical properties, hydrophilicity, cytocompatibility, and osteogenic differentiation abilitywere systematically studied and analysed. In vitro experiments showed that scaffolds containing 5%Ti2AlN (PCL@5#Ti2AlN) obtained the best cell adhesion and proliferation ability and significantly upregulatedthe alkaline phosphatase (ALP) level. In vivo experiments of tibial defect repair in rats showed thatthe PCL scaffold containing 5% Ti2AlN (PCL@5#Ti2AlN) could significantly promote the formation of newbone, and the experimental results of rabbit maxillofacial bone defect repair further proved that thePCL@5#Ti2AlN scaffold could effectively promote the repair of bone defects. Transcriptome analysis indicatedthat Ti2AlN may promote osteogenic differentiation by the Wnt/b-catenin signaling pathway andcalcium-binding proteins. These findings suggest that Ti2AlN/PCL composite scaffolds with improvedin situ bone repair ability represent an intelligent strategy for bone defect repair.