The invention discloses a composite material with a self-cleaning function, which is prepared from the following raw materials in parts by weight: 20-30 parts of epoxy resin, 25-40 parts of thermoplastic resin, 10-15 parts of polydimethylsiloxane, 8-14 parts of polytetrafluoroethylene, 6-12 parts of a heat stabilizer, 4-8 parts of a curing agent, 6-10 parts of silane, 8-16 parts of a coupling agent, 10-16 parts of a lubricant, 10-20 parts of a processing aid and 6-12 parts of a flame retardant. The invention relates to the technical field of new materials. According to the composite material with a self-cleaning function, through the composite material with a super-hydrophobic function, condensed water drops can be quickly collected and flow away and cannot be adhered to the surface of the composite material, so that the adhesion of dust is greatly reduced, the contact angle between the surface of the composite material and water is greatly increased, the rolling angle is reduced, the water drops can freely slide on the composite material, a self-cleaning super-hydrophobic function is achieved in real sense, the the composite material can be applied to resin-based composite materials in the fields of life, industry, military affairs and the like, and the implementation process is simple and high in controllability and engineering application feasibility.