Military equipment must receive signals but is prone to malfunction due to electromagnetic interference. Moreover, operational temperature variations can be detected by infrared sensors, leading to potential exposure. Therefore, developing materials that integrate electromagnetic shielding switches with infrared stealth capabilities is crucial for enhancing target security. This study investigates a novel composite material that combines shape memory polymer (SMP) and conductive layers for integrated functionality. Utilizing melamine sponge as the substrate, a cyanate ester (CE)-nitrile rubber (NR) SMP coating is applied via dip-coating, allowing the sponge to self-fixate after deformation. The SMP demonstrates stable shape recovery. Subsequently, a conductive nickel layer is added through keratin modification and chemical plating, providing electromagnetic shielding effectiveness exceeding 30 dB and reducing infrared emissivity to 0.6. The composite material is capable of achieving controllable electromagnetic shielding switches of 35 dB and 15 dB. It maintains excellent electromagnetic shielding and infrared stealth capabilities even under acid rain conditions and extreme temperature variations. This innovative approach holds significant promise for applications requiring simultaneous electromagnetic and infrared protection.