Primary bone cancer brings patients great sufferings. To deal with the bone defects resulted from cancer surgery, biomaterials with good bone-forming ability are necessary to repair bone defects. Meanwhile, in order to prevent possible tumor recurrence, it is essential that the remaining tumor cells around bone defects are completely killed. However, there are few biomaterials with the ability of both cancer therapy and bone regeneration until now. Here, we fabricated a 3D-printed bioceramic scaffold with a uniformly self-assembled Ca-P/polydopamine nanolayer surface. Taking advantage of biocompatibility, biodegradability and the excellent photothermal effect of polydopamine, the bifunctional scaffolds with mussel-inspired nanostructures could be used as a satisfactory and controllable photothermal agent, which effectively induced tumor cell death invitro, and significantly inhibited tumor growth in mice. In addition, owing to the nanostructured surface, the prepared polydopamine-modified bioceramic scaffolds could support the attachment and proliferation of rabbit bone mesenchymal stem cells (rBMSCs), and significantly promoted the formation of new bone tissues in rabbit bone defects even under photothermal treatment. Therefore, the mussel-inspired nanostructures in 3D-printed bioceramic exhibited a remarkable capability for both cancer therapy and bone regeneration, offering a promising strategy to construct bifunctional biomaterials which could be widely used for therapy of tumor-induced tissue defects.