The invention provides a material box rear cover opening and closing device which is composed of an opening and closing oil cylinder, a groove plate, a hinge rod, a hinge shaft, locking plates and the like. When the sweeping work is finished, under the pulling effect of the opening and closing oil cylinder, due to the fact that a slide groove of the groove plate has a certain sliding stroke length, hook heads of the locking plates are firstly separated from locking bases so that unlocking can be achieved; and after the stroke of the slide groove of the groove plate is limited, the material box rear cover opening and closing device continues to pull a rear cover to rotate to be separated from a material box in sequence. After trash and sewage are completely poured, under the push effect of the opening and closing oil cylinder, the rear cover firstly rotates and falls under the effect of the weight of itself to get close to the box material to be closed; and then within the stroke length range of the slide groove of the groove plate, the material box rear cover opening and closing device continues to pull the locking plates to rotate in sequence, the rear cover is locked after the hook heads of the locking plates are inserted in the locking bases, and no gas leakage or sewage leakage situation happens even though the pressure of the opening and closing oil cylinder does not need to be maintained.