The invention provides a method for automatic cargo loading, comprising the following process steps: 1. carriage positioning; 2. vertical conveying; 3. horizontal offline; 4. conveying steering; 5. grouping; 6. grabbing; 7. layer-by-layer arranging; 8. stacking up; 9. backward movement of mechanism; and 10. complementation of loading. The device for implementing the method comprises a long conveyor (1), an offline mechanism (4), a lower chute (3), a transitional conveyor (11), a bend conveyor (10), a suspension conveyor (5), a grouping machine (9), a mechanical arm (6), a robot (7), a movable platform (8) and a guide rail (2), wherein the guide rail (2) is fixed on floor slabs of a plant (C), and a carriage (B) is arranged below the movable platform (8). Based on the characteristics of wide working range and flexible action of the robot, the method and device provided by the invention can stack up cargos regularly, can meet with the loading requirements of a goods van with a carriage plate and an overlength carriage and realizes the automatic loading of cargos.