The term hip is recorded in African American Vernacular English (AAVE) in the early 1900s.
Slang dictionaries of past centuries give a term hip or hyp meaning melancholy or bored, shortened from the word hypochondriac.