Long-shaped automatic handkerchief cleaning machine, including car body, cleaning pool, handkerchief removal frame, water supply and drainage parts, stirring washing device, dehydration device, transfer device, and control system. The cleaning tank and the handkerchief frame are installed side by side above the car body. A stirring device and a dehydration device are installed in the cleaning pool. The transfer device includes a telescopic arm, a transfer arm, a gripper, a lifting column, and a motor. Two mops alternately mop the floor and clean alternately. The user puts the dirty mop into the cleaning pool, and is cleaned by the agitation device and the transfer device. After dehydration by the dehydration device and the sieve plate, the transfer device transfers the cleaned mop to the handkerchief taking frame. The user puts a dirty mop into the cleaning pool, and immediately takes a clean mop to continue mopping. The automatic cleaning machine is used for cleaning long flat mop, long cloth mop and long sponge mop. It is suitable for scrubbing the floors of shopping malls, public places, office areas, hotels, residential areas, and real estate, improving cleaning quality, saving water, and improving work efficiency.