No one now knows the source of the word “catawampus”.
It showed up in print shortly after 1840 and, most likely, had already been American slang for ten or fifteen years before that.
With humorous reference to General Zachary Taylor at the Battle of Buena Vista in the Mexican War, the New York Herald carried the squib (June 17, 1846):
On Taylor came and met the foe
All marshall’d forth so pompously,
And there he’s slain two thousand men,
All chaw’d up catawampously.
That is, to translate the meaning, as if they had been met by a fierce or savage bogy.