The earliest generation-ship story that I know of is "The Voyage That Lasted 600 Years", a novelette by Don Wilcox in Amazing Stories, October 1940 (available at the Internet Archive), seven months before Robert A. Heinlein's novelette "Universe" (the first half of his fix-up novel Orphans of the Sky), which first appeared in Astounding Science-Fiction, May 1941. I'm pretty sure "The Voyage That Lasted 600 Years" is the first story about a generation ship gone haywire. I leave it to you to decide if it meets your requirements. I will post story details after I've had time to reread it.
Update. In 2066 the S.S. Flashaway sets out on a 600-year mission to colonize "the Robinello planets" on behalf of the U.S.A. Unlike the people in Heinlein's "Universe", the Flashaway people, or at least enough of them to keep the ship running, are aware that they are on a spaceship, and none too happy about it. The story is narrated by Prof. Gregory Grimstone, the designated Keeper of the Traditions. He is the one person on the ship who is to spend most of his time in a freezer, coming to life every 100 years to give advice and try to maintain continuity.
Conditions on the ship go rapidly downhill. They suffer from overpopulation, starvation, disease, underpopulation, murder, suicide, family feuds, fighting over food, fighting over women, etc. By Grimstone's fourth awakening, in 2466:
"They've destroyed 'most everything," the hard-bitten old captain rasped. "And they haven't overlooked you. They've destroyed you completely. You are an ogre.
I wasn't clear on his meaning. Dimly in the back of my mind the hilarious farewell of four centuries ago still echoed.
"The Flashaway will go through!" I insisted.
"They destroyed all the books, phonograph records, movie films. They broke up clocks and bells and furniture—"
And I was supposed to carry this interspatial outpost of American civilization through unblemished! That was what I had promised so gaily four centuries ago.
"They even tried to break out the windows," the captain went on. "'Oxygen be damned!' they'd shout. They were mad. You couldn't tell them anything. If they could have got into this end of the ship, they'd have murdered us and smashed the control boards to hell."
I listened with bowed head.
"Your son tried like the devil to turn the tide. But God, what chance did he have? The dam had busted loose. They wanted to kill each other. They wanted to destroy each other's property and starve each other out. No captain in the world could have stopped either faction. They had to get it out of their systems."
[. . . .]
To return to the captain's story, the war (he said) had degraded the bulk of the population almost to the level of savages. Perhaps the comparison is an insult to the savage. The instruments of knowledge and learning having been destroyed, beliefs gave way to superstitions, memories of past events degenerated into fanciful legends.
The rebound from the war brought a terrific superstitious terror concerning death. The survivors crawled into their shells, almost literally; the brutalities and treacheries of the past hung like storm clouds over their imaginations.
As year after year dropped away, the people told and retold the stories of destruction to their children. Gradually the legend twisted into a strange form in which all the guilt for the carnage was placed upon me!
I was the one who had started all the killing! I, the ogre, who slept in a cave somewhere in the rear of the ship, came out once upon a time and started all the trouble.
[. . . .]
I listened with sickening amazement. I was the Traditions Man: or rather the "Traddy Man"—the bane of every child's life.
Parents, I was told, would warn them, "If you don't be good, the Traddy Man will come out of his cave and get you!"