To act in a haphazard or aimless way; to act frantically or without control.
run around like a headless chicken
How often have the words run around like a chicken with its head cut off and run around like a headless chicken occurred in a corpus of books? (source: Google Ngram Viewer )