Is there a history behind the word "hacker" and "hacking"?
Could it have anything to do with "hashing" i.e. using a hash function?
This question is too basic; it can be definitively and permanently answered by a single link to a standard internet reference source designed specifically to find that type of information. See the FAQ for guidance on how to improve it.
Following the Jargon file,
That's essentially the gist: you don't produce quality software, you don't develop, you don't project. You take an idea or someone else's piece of software and hack it roughly with a software equivalent of an axe, to form something that fits your own idea of "mostly working" — sometimes the idea being quite far from what general populace would find acceptable. Bypass limitations imposed for business or political (or even safety) reasons, bind different completely mismatching systems together for some weird results, and generally do to computers things that can't be named by any professional terminology, but are quite equivalent to hacking some item with an axe to make it function as something entirely different (say, turning an armchair into a swing).
So, this is not a morph of some word or direct use of some obscure meaning of 'to hack', it's a metaphorical use of the very basic meaning — to cut or chop with repeated and irregular blows.
It's not related to hashing.
The roots of hacker can be found from the Tech Model Railroad Club of MIT. In 1959, TMRC member Peter R. Samson complied a dictionary, which contained both the root work, hack, and its derivative, hacker. The italics are Samson comments from 2006:
Perhaps the original meaning was similar to hacking through an immense jungle with a machete, it can go on forever.
In fact, the OED also defines hack as a tool for breaking or chopping up, dating from before 1300:
And hacker follows. From 1620:
So the sense of mangling and bodging together software and/or hardware isn't too far off.
The OED’s definition 1d of hacking is
The earliest citation is dated 1976:
In the same year, hacker is found meaning
My own speculation is that the technological meaning may be related to the use of the verb hack to mean To cope with, manage, accomplish.
The Chinese love to transliterate words and find a parallel meaning. The English word hacker is translated as 黑客 [hēi kè], literally “dark visitor,” an apt translation for the hacker’s covert actions.
While other have given you a correct English etymology, I hope that this back translation will give you some insight into the connotation. It is more at "secretive" and "destructive," and the resemblence to a computer hash function is accidental.