The surgical treatment of osteosarcoma remains a challenge because of massive bone defects and tumor recurrence. Herein, a facile strategy inspired by cooking is developed to fabricate hierarchically porous composite scaffold for bone tumor ablation and massive bone defect repair. Silk fibroin (SF) as a biological foaming agent is foamed by mechanical stirring to form physical hydrogel through strong interaction with 2D Ti3C2 MXene nanosheets. Bacterial cellulose (BC) is used to stabilize air bubbles to keep porous structure. Hierarchically porous SF/BC/MXene (FSCM) scaffold with ∼200 μm macropore and nanofibrillar wall is acquired by lyophilization. Such FSCM composite scaffold presents prominent osteosarcoma ablation performance after near-infrared (NIR) light irradiation, and features excellent bone defect repair ability. This work represents a newly strategy to fabricate hierarchically porous bifunctional scaffold for enhancing bone tumor ablation and facilitating massive bone defect repair in the clinical treatment of osteosarcoma.