Shape‐memory polymers have attracted attention as smart implant materials in recent years because they are lightweight, low‐cost, easily processable, and because they undergo large deformation. Here, cellulose nanofibers (CNFs) were used as a reinforcement for polyhydroxybutyrate (PHB)/polycaprolactone (PCL) composites to improve mechanical properties. The composites were investigated by rheological tests, differential scanning calorimetry, dynamic mechanical analysis, mechanical property tests, and shape‐memory tests. The printability of PHB/PCL/CNFs composites was demonstrated by using them to print interconnected porous structures with a gyroid surface. The results showed that the PHB/PCL (80:20) composites with 1 wt% CNF displayed the best comprehensive mechanical and shape‐memory properties. As a functional verification, a model of the self‐opening hand was fabricated by 3D printing, and its deformation and recovery capabilities were evaluated.