The invention belongs to the technical field of film materials, in particular to a transparent heat-insulating and anti-ultraviolet composite film based on a photonic quasi-crystal material and a preparation method thereof. The structure of the composite film of the present invention is a transparent base layer, a photonic quasicrystal functional film layer, an adhesive layer and a peelable layer; the photonic quasicrystal film is composed of polymer core-shell structure microspheres arranged in three-dimensional order and infrared functional nanoparticles through Formed by a specific process, it has tunable structural color and optical transparency. The structural color, transparency, and wavelength range of blocking ultraviolet and infrared can be adjusted by adjusting the core microsphere size, shell thickness, refractive index and infrared functional nanoparticle content of the core-shell microspheres, and the ultraviolet and infrared wavelength range can also be controlled by adjusting the thickness. and infrared blocking efficiency. The composite film formed by the invention has high ultraviolet light blocking efficiency, high visible light transmittance, good heat insulation effect, excellent transparent heat insulation, anti-ultraviolet and explosion-proof performance; it can be used for energy-saving and explosion-proof of automobiles and architectural glass.