"mad, crazy," 1844, American English, from Spanish loco (adj.) "insane," of uncertain origin, perhaps from Arabic lauqa, fem. of 'alwaq "fool, crazy person." Loco-weed was the name given to species of western U.S. plants that cause cattle and horse diseases that make them stagger and act strangely. But the adjective seems to be the older word.