Fromhay +wire.The original meaning of 'likely to become tangled unpredictably or unusably, or fall apart', as though only bound with the kind of soft, springy wire used to bind hay bales[1] comes from usage in New England lumber camps circa 1905 wherehaywire outfit became the common term to refer toslap-dash collections of logging tools. Togo haywire has since evolved to represent theact of falling apart or behaving unpredictably, as would wire spooled under tension springing into an unmanageable tangle once a piece had been removed from the factory spool, e.g., "he took off the back of his watch, removed a gear and the whole works went haywire."
It was working fine until it wenthaywire and wouldn't stop printing blank sheets.
Those kids gohaywire when they don't get what they want.
1905 May, J. W. Reading, “Engine Failures”, inBrotherhood of Locomotive Engineers Monthly Journal[2], volume XXXIX, number 5, page423:
The engineer who makes of his calling a burden, who sees nothing but the wrong, or imposition as he may term it, who fancies perhaps that the whole world has conspired against him, who commences to damn things as soon as he appears upon the scene of his labors, and continues to damn everything, including his train crew, the engine, the officers, and almost everything, animate and inanimate, while making the round trip, is working out his own destiny, and it is but charitable to say of such a man that he is not well, his digestion has gone" hay wire " as it were.
1928, Horace Marden Albright, Frank J. Taylor, chapter 1, in"Oh, Ranger!": A Book about the National Parks[3], page 1:
"I got phone orders at Tuolumne Meadows to pack up and come over Sunrise Trail. Started at sunrise. Everythinghaywire, including cranky pack horse which kept getting off trail. Phoned in at Vernal Falls station. Ordered to hurry down, help catch two auto thieves which broke jail just after breakfast. Assigned to guard Coulterville Road.