"nothing at all," 1968, U.S. slang, from jack (n.) + shit (n.).
Entries linking to jack-shit
jack n.
late 14c., jakke "a mechanical device," from the masc. name Jack. The proper name was used in Middle English for "any common fellow," and thereafter extended to various appliances which do the work of common servants (1570s). Also used generically of male animals (1620s, see jackass, jackdaw, etc.).
As a portable contrivance for raising weight by force from below, 1703. As the name of a device for pulling off boots from 1670s. The jack in a pack of playing cards (1670s) is in German Bauer "peasant." Slang meaning "money" is by 1890 (in earlier slang it meant "a small coin"). Jack-towel, one sewn together at the ends round a roller, is from 1795. The jack of Union Jack is a nautical term for "small flag at the bow of a ship" (1630s) and perhaps is from the word's secondary sense of "smaller than normal size."
shit n.
Middle English shit "diarrhea," from Old English scitte "purging, diarrhea," from source of shit (v.). The general sense of "excrement" dates from 1580s (Old English had scytel, Middle English shitel for "dung, excrement;" the usual 14c. noun for natural discharges of the bodies of men or beasts seems to have been turd or filth). As an exclamation attested in print by 1920 but certainly older. Use for "obnoxious person" is by 1508; meaning "misfortune, trouble" is attested from 1937.
Shit-faced "drunk" is 1960s student slang; shit list is from 1942. Shit-hole is by 1937 as "rectum," by 1969 in reference to undesirable locations. Shitload (also shit-load) for "a great many" is by 1970. Shitticism is Robert Frost's word for scatological writing.
Up shit creek "in trouble" is by 1868 in a South Carolina context (compare the metaphoric salt river, of which it perhaps a coarse variant). Slang not give a shit "not care" is by 1922. Pessimistic expression same shit different day is attested by 1989. To get (one's) shit together "manage ones affairs" is by 1969. Emphatic shit out of luck is by 1942.
The expression when the shit hits the fan "alluding to a moment of crisis or its disastrous consequences" [OED] is attested by 1967.
The expression is related to, and may well derive from, an old joke. A man in a crowded bar needed to defecate but couldn't find a bathroom, so he went upstairs and used a hole in the floor. Returning, he found everyone had gone except the bartender, who was cowering behind the bar. When the man asked what had happened, the bartender replied, 'Where were you when the shit hit the fan?' [Hugh Rawson, "Wicked Words," 1989]