The invention provides an automatic loading and unloading device for a digital controlled lathe and relates to the technical field of machine manufacturing equipment. The device is characterized in that a material distributing cylinder, a material distributing groove and a hopper frame are arranged on a base, wherein the material distributing cylinder is in driving connection with the material distributing groove, two hoppers are fixed on the hopper frame, a guiding groove is vertically formed in each hopper, and an auxiliary blanking device is arranged between the two hoppers; the base is fixed with a feeding cylinder support, a feeding cylinder is fixed on the feeding cylinder support and connected with a loading cylinder support through threads, a loading cylinder, a charging barrel anda positioning bolt are fixed on the loading cylinder support, and the loading cylinder is in driving connection with the charging barrel. The automatic loading and unloading device can feed bar materials with different diameters and lengths, automation of the production process is improved, labor intensity of a worker is reduced, the mechanical structure is simpler than a manipulator, and the device occupies a small area and is low in production cost and acquisition cost.