"the earliest citation of it that I can find is in the 1967 edition of Eric Partridge's A Dictionary of Slang and Unconventional English:
'
"Wait till the major hears that! Then the shit'll hit the fan!"
'
Partridge lists the phrase as Canadian, circa 1930, but as he gives no supporting evidence we have to go by the 1967 date, although it is undoubtedly earlier.
'
Other, more polite, forms of the phrase, involving eggs, pie, soup and 'stuff', can certainly be dated from the USA the 1940s; for example, Max Chennault's Up Sun, 1945:
'
"Sounds like the stuff was about to hit the fan.""
https://www.phrases.org.uk/meanings/407950.html
Earliest I remember it is from my callow youth back in the late '50's, early 60's, as the punch line in a rude joke about a midget, "my little man, so spic and span, where were you when the shit hit the fan?"
'
"Wait till the major hears that! Then the shit'll hit the fan!"
'
Partridge lists the phrase as Canadian, circa 1930, but as he gives no supporting evidence we have to go by the 1967 date, although it is undoubtedly earlier.
'
Other, more polite, forms of the phrase, involving eggs, pie, soup and 'stuff', can certainly be dated from the USA the 1940s; for example, Max Chennault's Up Sun, 1945:
'
"Sounds like the stuff was about to hit the fan.""
https://www.phrases.org.uk/meanings/407950.html