Detta är en vanlig science fiction trope, så det finns flera verk som passar den här begränsade beskrivningen. Jag kommer emellertid att föreslå Non-Stop av Brian Aldiss, från 1958. Den publicerades också under titeln Starship .
Per Wikipedia :
The novel's protagonist, Roy Complain, lives in a culturally-primitive tribe in which curiosity is discouraged and life is solitary, poor, nasty, brutish and short. With a small group, he leaves his home and ventures into uncharted territory. The consequent discoveries will change his perception of the entire universe.
Complain's small tribe roam nomadically through corridors overrun by vegetation. After his wife is kidnapped, a tribal priest named Marapper encourages Complain to join a furtive expedition into the unexplored corridors. It is Marapper's belief that they are all living on board a moving spacecraft and that if they can reach the control room, they will gain command of the entire gargantuan vessel.