The invention discloses an environment-friendly polyaniline anti-corrosion and anti-shedding coating. The coating comprises a component A and a component B, wherein the weight ratio of the component A to the component B is (10 to 1)-(20 to 1); the component A is prepared from the following components: (1) 53g of liquid epoxy resin E56, (2) 6g of diethylene glycol dibenzoate, (3) 0.5g of OP-10, (4) 10g of n-amyl alcohol, (5) 3g of ammonium persulfate, (6) 1.5g of distilled water, (7) 1g of 0.4mol/L camphorsulfonic acid water solution, (8) 10g of aniline, (9) 0.5g of methyl silicone oil and (10) 7g of neopentyl glycol diglycidyl ether; the component B comprises the following components: 110g of liquid fatty polyamine, 30g of polyaniline, 5g of quartz sand, 10g of ethylene glycol phenyl ether, 5g of talcum powder and 5g of rosin glycerin ester. The coating has the advantages of high polyaniline content, good anti-corrosion property, no pollution, low cost, and the like.