The utility model relates to an entrance and exit fence of a mechanical garage, which comprises a first upright post, a second upright post, a cross beam, a first fence plate, a second fence plate, a motor, a lifting piece and a limiting piece, the first upright post and the second upright post are vertically arranged on the ground, and the first upright post and the second upright post are parallel to each other; the cross beam is vertically arranged at the tops of the first stand column and the second stand column, the first fence plate and the second fence plate are arranged between the first stand column and the second stand column, the first fence plate is located on the outer side of the second fence plate, and the motor is arranged at the top, close to the second stand column, of the cross beam. The motor is connected with the second fence plate through the lifting piece, and the limiting piece is arranged on the second stand column. The mechanical garage is simple in structure and convenient to construct, the height requirement for on-site fence adding can be lowered, pedestrians are prevented from entering the mechanical garage by mistake in the operation process, and the use safety of the mechanical garage is effectively improved.