The invention provides a preparation method of a composite microencapsulated anti-ultraviolet finishing agent. The method includes the following steps that walnut shells are dried, crushed and subjected to ethanol extraction, extraction liquid is concentrated, refrigerated, filtered and heated in sequence, and then the extraction liquid is subjected to standing and is filtered; water is added in the extraction liquid, stirring is performed, activated carbon is added, stirring is performed, heat preservation is conducted, ethanol is added, and then stirring, filtering, heat preservation, standing, filtering and washing are conducted sequentially to obtain walnut shell extract; egg white is mixed with water, polyethylene glycol is added, stirring is conducted, the mixture is subjected to standing for layering, supernate is removed to obtain a precipitate, magnesium chloride is added in the precipitate, stirring is performed, and then stirring centrifugation, washing centrifugation and freeze-drying are conducted sequentially to obtain crude mucin; hydroxypropyl methyl cellulose phthalate, a silane coupling agent, ethyl orthosilicate and an ethanol aqueous solution are taken and stirred, and then the walnut shell extract and the crude mucin are added and stirred; sodium stearyl lactate and sodium lignosulphonate are added and stirred; homogenization, spray drying and cooling are performed sequentially to obtain the finishing agent. A fabric treated with the finishing agent prepared by the method has a good anti-ultraviolet effect and certain antimicrobial property.