Tom Dalzell, Flappers 2 Rappers: American Youth Slang (1996) offers a series of theories from earlier sources about the origin of the term hip (or hep), although Dalzell has the good sense not to endorse any of them. Here, in chronological order are the six oldest theories that Dalzell cites:
The expression was given its name from the characteristics of an old circus man who was famous ... He would always say that he knew just what to do or what was being said. ... Finally, when anyone contemplated an act or expression around the show grounds, the gang would say, "Yes you are the same as Joe Hept." (How to Be a Detective by F.J. Tillotsen ).
Hep ... derived from the name of a fabulous detective who operated in Cincinnati, the legend has it, who knew so much about criminality and criminals that his patronymic became a byword for the last thing in wisdom of illicit possibilities. (Vocabulary of Criminal Slang by L.E. Jackson and C.R. Hillyer ).
"On the hip" used in the sense of a person who has a supply of liquor on his person. (Thomas Dorgan, San Francisco Call and Post, June 10, 1920 ...)
No doubt the Army, where the sergeant or drill-master commands, "Step, step, step" to a squad of recruits until from sheer weariness the command becomes "Hep, hep, hep," meaning of course, "Keep in step, on the alert." (Godfrey Irwin, American Tramp and Underworld Slang ).
The sense of hep and hip is derived from an old phrase used in wrestling, "to have on the hip." When a wrestler had his opponent on the hip he had complete and effective control of him, and was in position to drop to the floor on top of his man, ready to take the fall. (Peter Tamony, "Origin of Words: Hep," News Letter and Wasp, August 25, 1939)
Nowadays you have to call a gone character a hipster. That comes from the fact that a real gone musician is said to have his boots laced right up to his hips. (Cab Calloway, Original Jive Dictionary, 1942). ...
Other origin theories mentioned by Dalzell include opium smokers' slang (because denizens of opium dens reclined on their hip while indulging), a Chicago saloon-keeper named Joe Hep, and a farmer's call of encouragement to his plow horses.
Of all these possibilities, only the wrestling sense of "on the hip" (cited by Peter Tamony in his 1939 explanation) is mentioned in Farmer & Henley, Slang and Its Analogues (1893)—not surprising since that meaning goes back to Shakespeare at least. (In The Merchant of Venice , Shylock says, "If I can catch him [Antonio] upon the hip, I will feed fat the ancient grudge I bear him.")
But being caught "on the hip" in the wrestling sense of the phrase seems to have very little in common with being hip (or "on the hip") in the in-the-know sense of the phrase. My impression is that the twentieth-century meaning of hip is probably only coincidentally similar to the old wrestling phrase.