The origin of the term "86" is not clear. However, there are several theories.
The Oxford English Dictionary suggests that the number 86 is used as rhyming slang for nix, i.e. say 'no' to, or put the kibosh on, something or someone. Another idea is that the term is after article 86 of the New York State Liquor Code, which supposedly outlines the circumstances under which a bar customer should be refused alcohol or put out of the bar. There’s a good story about the New York speakeasy, Chumley’s, in the 1920s. Chumley’s had a back-door exit onXXXXX and when the police were sighted at the front doorthe barkeeps yelled ‘86-it' to signal the customers to run out the back door on that street
Finally, Cecil Adams, author of the "Straight Dope" columns, which is a trustworthy resource about all kinds of interesting factoids and phenomena has this to say on the subject: “The term derives via a roundabout route from a number code allegedly in wide use in 1920s diners and soda fountains. 86 supposedly meant, "We're all out of the item ordered," said by the cook or some other honcho to a soda jerk or similar minion.”
So it seems safe to assume that this term originated in the roaring 20s, at least!