The invention discloses environment-friendly and oil-resistant rubber for sealing. The rubber is prepared from raw materials in parts by mass as follows: 50-70 parts of nitrile rubber, 8-15 parts of a stabilizer, 20-50 parts of modified chloroprene rubber, 20-30 parts of carbon black, 8-12 parts of polystyrene, 1-1.5 parts of a vulcanizing agent, 15-20 parts of an additive, 3-4 parts of stearic acid, 5-10 parts of zinc oxide, 12-18 parts of magnesium oxide, 10-14 parts of an anti-ageing agent, 20-30 parts of paraffin and 4-5 parts of an aid. In combination with the characteristics of nitrile rubber and modified chloroprene rubber, the rubber not only has the characteristics of good oil resistance, higher wear resistance and better heat resistance, but also has high initial adhesive force and bonding strength, flexible adhesive layer, good elasticity, impact resistance and vibration resistance; the proportion of the vulcanizing agent is reduced, so that environmental protection and no pollution are realized; the additive prepared from cyanate ester resin, acrylic resin, sodium tripolyphosphate and kaolin in a specific ratio is added, and accordingly, the air tightness of the rubber is improved.