Green’s Dictionary of Slang

hard n.

1. of alcohol or drugs.

(a) [late 17C–early 19C] sour or stale beer.

(b) [mid-19C+] plug tobacco.

(c) [mid-19C+] (US) hard cider or whisky.

(d) [1960s+] (US/N.Z. drugs) hard drugs, i.e. cocaine and heroin.

2. [mid-19C+] (UK Und., also the hard) coins (as opposed to notes).

3. [late 19C-1950s] (Und.) hard labour in prison.

4. [late 19C+] an erection [underpinned by hard-on n. (1)].

5. [1960s+] a thug, a hoodlum [hard case n. (2)].

In phrases

give hard for soft (v.)

[late 19C] of a man, to have sexual intercourse.

give soft for hard (v.)

[19C] of a woman, to have sexual intercourse.

on the hard

[1960s] of a penis, being erect.