Shape memory polymers (SMPs), with the capability of transforming between temporary and permanent shapes, have fascinating applications in aerospace and mechanical engineering. However, for the transition of SMPs, the existing heating strategies, including water and oil bathing, usually involve global heating on structures with limited heating rates and untouchable surroundings. This limits the underlying applications of precise and selective deformation. Here, we report a co-extrusion 4D printing (CE-4DP) strategy that integrates continuous metallic fibers into thermoplastic SMP to build an electrical heating path in the polymer matrix. We systematically investigated the influence of crucial printing parameters on the fabrication and proposed an analytical model and a printable phase diagram to shed light on the mechanism of CE-4DP. The heating rate for the SMP composites was 70 times faster than that of the oil bath method. We also demonstrated that the SMP composites can be heated selectively and sequentially, thereby resulting in precise and programmable deformation. Besides, the capability of self-sensing is extended for monitoring the deformation.