The present invention relates to the technical field of coating agent, in particular to a coating agent containing nano-SiO2 and a preparation method thereof. The coating agent consists of raw materials in parts by weight as follows: 50-60% film-forming agent, 5-10% plasticizing agent, 2-6% dispersing agent, 10-30% coloring agent, 15-20% antisticking agent and 2-5% nano-SiO2. In the present invention, the nano-SiO2. and the film-forming agent in the formulation can form a composite, which can enhance the property of coating agent, improve the coating film strength, and enhance the UV-protection and anti-discoloration functions, so as to improve the storage stability of drugs. The UV-protection and anti-discoloration functions of the coating agent prepared herein can be improved by more than 75%, and their film strength can be improved by more than 30%.