The invention relates to an automatic excrement cleaning machine for pigs, cattle, sheep and livestock pens, which includes a bottom plate, a support frame is installed on the bottom plate, a rotating conveying device is installed on the lower end of the supporting frame, a cleaning and collecting device is installed on the rotating conveying device, and a cleaning and collecting device is installed on the bottom plate. Rotary sweeping device, a collection box is installed on the upper end of the bottom plate, the collection box is connected with the adjustment device, the adjustment device is installed on the bottom plate, a cleaning device is installed on the collection box, a sweeping device is installed on the bottom plate, cleaning collection device, rotary conveying device, collection Box, adjusting device, cleaning device, rotary sweeping device and sweeping device cooperate with each other to complete the process of automatic cleaning of livestock manure. The invention can solve the problems of manual cleaning and collection of livestock pens in the cleaning process of existing small livestock pens, manual cleaning of livestock pens, manual cleaning of livestock pens, high labor intensity and low work efficiency, etc., and can realize livestock pens Automatic cleaning function.