The invention relates to a colored oily fertilizer anti-caking agent prepared from inorganic pigment and application of the colored oily fertilizer anti-caking agent. The colored oily fertilizer anti-caking agent comprises the following ingredients in percentage by mass: 2-4% of iron oxide red, iron oxide yellow, iron oxide blue, iron oxide green, iron oxide purple, iron oxide brown or iron oxide black and 98-96% of an oily anti-caking agent, and is prepared by uniformly milling and mixing such ingredients by adopting a horizontal mill. The colored oily fertilizer anti-caking agent is applied to fertilizer coating, and 1.0-1.6 kilograms are used in each ton of a fertilizer, so that a corresponding color of red, yellow, blue, green, purple, brown or black is shown in the appearance of the fertilizer. The colored oily fertilizer anti-caking agent with the corresponding color of red, yellow, blue, green, purple, brown or black is provided for fertilizers with different appearance colors, so that inside and outside colors of the fertilizer are consistent, color difference and materials with inconsistent colors are avoided; the colored oily fertilizer anti-caking agent is stable and uniform in color, strong in coating capability, resistant to light and heat, colorfast and non-discoloring, can also be used as a fertilizer variety distinguishing and anti-counterfeiting mark, and is low in use cost and good in anti-caking performance.