The invention discloses a spinning machine. The spinning machine structurally comprises a phototube, a support, a control panel, a telescopic tube, a cotton delivery tube, a screw, a cart, a central shaft, an iron attracting device, inner-circle wall boards, outer-circle wall boards, a ground rail and a cotton grabbing beater, wherein the outer-circle wall boards are connected with the ground rail, the ground rail is movably connected with the support, the support is provided with the control panel, the control panel is connected with the phototube, the support is connected with the telescopictube, the bottom of the telescopic tube is connected with the cart, the iron attracting device is arranged in the cart, the bottom of the cart is movably connected with the cotton grabbing beater, the top of the telescopic tube is connected with the cotton delivery tube, the support is movably connected with the central shaft, the central shaft is movably connected with the inner-circle wall boards, the iron attracting device consists of a motor, a rotary shaft, an iron scraping plate, an iron collecting box and a powerful magnet, the motor is movably connected with the rotary shaft, the rotary shaft is connected with the powerful magnet, and the powerful magnet is movably connected with the iron scraping plate. The spinning machine can attract irony impurities in cotton, play an impurityremoving effect and improve the working quality.