The invention discloses an automatic bagging machine, and relates to the technical field of packaging machinery. The automatic bagging machine comprises a bag receiving bin mechanism, a bag clamping mechanism, a bag storage, a bag taking mechanism, a bag opening mechanism, a bagging mechanism, a bag shaking mechanism, a bag holding mechanism, a bag opening arranging mechanism, a bag opening guidemechanism and a bag sewing mechanism, wherein the bag shaking mechanism comprise a bag shaking platform which moves up and down in a reciprocating manner and flaps the bottoms of packaging bags sleeving on the bag clamping mechanism, the bag holding mechanism is arranged on one side of the bag shaking mechanism, the bag opening arranging mechanism is used for sorting the bag opening of each packaging bag, and the bag opening of each packaging bag enters the bag sewing mechanism under the guide of the bag opening guide mechanism to be sealed. According to the automatic bagging machine, in the bagging process, bag pouring of the packaging bags can be effectively prevented, the bag opening of each packaging bag is folded into an M shape through the bag opening arranging mechanism when the packaging bag is sealed, so that the opening of the sealing bag forms an end surface, and therefore material loosening of salt bags in the packaging bags cannot be caused in the transportation process.