Microwave-absorbing materials with regulatable absorption frequency and optical camouflage hold great significance in intelligent electronic devices and advanced stealth technology. Herein, we present an innovative microwave-absorbing foam that can dynamically tune microwave absorption frequencies via a simple mechanical compression while in parallel enabling optical camouflage over broad spectral ranges by adjusting the structural colors. The vivid colors spanning different color categories generated from thin-film interference can be precisely regulated by adjusting the thickness of the conformal TiO2 coatings on Ni/melamine foam. Enhanced interfacial and defect-induced polarizations resulting from the introduction of TiO2 coating synergistically contribute to the dielectric attenuation performance. Consequently, such a foam exhibits exceptional microwave absorption capabilities, and the absorption frequency can be dynamically tuned from the S band to the Ku band by manipulating its compression ratio. Additionally, simulation calculations validate the adjustable electromagnetic wave loss behavior, offering valuable insights for the development of next-generation intelligent electromagnetic devices across diverse fields.