Who invented the why did the chicken cross the road joke?

The exact origin of the riddle is obscure. Its first known appearance in print occurred in 1847 in The Knickerbocker, a New York monthly magazine:

An 1847 version of the joke was possibly its first appearance in print
...There are 'quips and quillets' which seem actual conundrums, but yet are none. Of such is this: 'Why does a chicken cross the street?['] Are you 'out of town?' Do you 'give it up?' Well, then: 'Because it wants to get on the other side!'

The joke may already have become widespread by the 1890s, when a variant version appeared in the magazine Potter's American Monthly:

Why should not a chicken cross the road?
It would be a fowl proceeding.
From:wikipedia