An automatic pull-and-push box mechanism for a fixed type rubbish compression device relates to the field of rubbish compression devices and mainly comprises a compression main machine, a rail support, guide bolts, guide bolt limit supports, a pull-and-push oil cylinder, a movable push seat, a fixed push seat, hooks and spring supports, wherein a cuboid penetrates through the movable push seat from the front to the back, the rail support is fixed on the compression main machine, a telescopic rod and the fixe push seat of the pull-and-push oil cylinder are fixedly connected, support lug plates are arranged at the front end of the fixed push seat, the support lug plates are connected with the hooks through pin shafts, the movable push seat and the fixed push seat are in movable connection through the guide bolts, the guide bolt limit supports are fixed on two sides of the front end of the guide rail support in a supporting mode, the spring supports are in hinge connection with the front end of the movable push seat, and the other end of the spring supports are in hinge connection with the hooks. By means of the design, the hooks are automatically in butt joint, safety is improved, the butt joint time of a box body and the main machine is reduced, and compression efficiency is greatly improved.