In this study, an infrared camouflage and radar compatible stealth structure based on metamaterial is designed and fabricated. Two types of frequency selective surfaces (FSS) with different infrared emissivity values are arranged into a specific pattern, which is similar to a visible camouflage pattern. The different infrared emissivity regions in the infrared camouflage layer (IRCL) are 0.27, 0.55, and 0.93, and the radar waves transmittance within 18 GHz is greater than 98%. Below the IRCL is a wideband radar metamaterial absorber based on square-ring resonant elements, which can absorb the radar waves and dissipate them through ohmic loss. The particle swarm optimization algorithm combined with the equivalent circuit model rapidly optimises the structure of the radar metamaterial abosrber, achieving an absorption rate greater than 90% from 4.5 GHz-18 GHz. And the absorption efficiency still maintains 80% at an oblique incidence range of 45°. The Indium Tin Oxide (ITO) film was etched by laser to obtain the above microstructures. The combination of two layers of metamaterial structure realizes the compatible stealth capability of infrared camouflage and radar absorption.