There was a crooked man and he walked a crooked mile,
He found a crooked sixpence upon a crooked stile.
He bought a crooked cat, which caught a crooked mouse.
And they all lived together in a little, crooked house.

 

The rhyme was first recorded by James Orchard Halliwell in the 1840s and gained popularity in the early twentieth century. Some say the town of Lavenham, with its distorted, or "crooked" buildings inspired the poem.

Another theory is that the poem originates from the history of King Charles I of England (1600–1649): The crooked man is reputed to be the Scottish General Sir Alexander Leslie, who signed a covenant securing religious and political freedom for Scotland. The "crooked stile" in the poem is supposedly the border between England and Scotland. "They all lived together in a little crooked house" referring to the fact that the English and Scots had at last come to an agreement, despite continuing great animosity between the two countries, who nonetheless had to learn to live with each other due to their common border.

Source