The expression appears to be an AmE one from the ‘50s. The Phrase Finder suggests a possible derivation from an earlier and even more mysterious expression “can’t cut the musturd” with the same meaning:
Can’t hack it :
- Slang sense of "cope with" (as in can't hack it) is first recorded in American English 1955.
From the Phrase Finder:
The Oxford English Dictionary, after giving the principle uses of "hack", such as chop or chop at, mutilate with jagged strokes, give us this:
d) To cope with, manage, accomplish; to tolerate, accept; to comprehend; freq. to hack it. slang (orig. U.S.):
- : 1955 Antioch Rev. XV. 379, I can't hack something like stealing.. .
If, as seems likely, "can't hack it" originated as American slang in the 1940s or '50s, it probably was introduced as a variation on "can't cut it" (with the same meaning). The it in "can't cut it" is the mustard; and the phrase "cut the mustard" is wreathed in mysteries as well.
Also, from dailywritingtips:
- One school of thought is that hack simply derives from an Old High German word that refers to chopping. (A short, sharp cough is also called a hack.) From that meaning, it derived the figurative sense of crudely or ruthlessly working on something and then of simply toiling; by extension, the word was applied to being able or unable to manage or tolerate something: The now-rare expression “You just can’t hack it” expressed this idea.