The Diary of a Young Girl: Anne Frank's diary does not begin with her family hiding in the attic. It begins with a girl receiving a blank diary for her thirteenth birthday, having a party, attending school, describing her friends...
The Bartimaeus Trilogy undergoes one, together with some major Character Development somewhere during the second book, and, most noticeably, between the second and third. It starts out as your typical fantasy story about a preteen boy and his quirky sidekick demon defeating the bad guy and saving a whole lot of useless adults in the process. In the later books the saved government is exposed to be oppressive and totalitarian, the glorified idols of the protagonist's youth are viciously unmasked. By the end of the series the books describe a dying empire, clinging desperately to its former glory. The most interesting part is probably that the kid from the first book turns into one of the oppressors and the reader ends up rooting for La Résistance, that is originally introduced very briefly as nothing more than a bunch of deranged terrorists.
Vladimir Vasilyev's novel The Black Relay Race, while not a direct sequel to his Death or Glory novel, takes place in the same 'verse. However, unlike DoG, which involves a human colony discovering that there's more to humans than meets the eye, while alien races are hunting them, The Black Relay Race is a horror novel, taking place on a space yacht transporting strange cargo with the crew disappearing one-by-one. Then follow the novels The Legacy of Giants and No One but Us, with an additional genre shift, although much more like the first novel than the second. These are pure war novels, inspired by David Brin's Startide Rising.
Treasure Box turns out to be one of his "tales of dread", but you don't realize it's in that genre until well into the story, about the same time the main character does.
In the Ender Saga, the first novel (and the most famous one) Ender's Game is about a young boy who is taught to be a soldier in order to command humanity's fleet against the "buggers". The sequel Speaker for the Dead is focused on Ender (who is now in his 30s) 3000 years later (he survives due to frequent relativistic travel), helping a dysfunctional family and studying a new alien race. The third and fourth novels (which was originally one novel split for publishing reasons), Xenocide and Children of the Mind, continue the story of the second novel (after a 30-year Time Skip) with Ender slowly moving out of focus as the protagonist. Additionally, they add tons of metaphysics into the mix, to the point where FTL travel becomes reality because a powerful AI can imagine it. The difference between the first and the second novels is justified because Card had always wanted to write Speaker for the Dead but couldn't find a compelling protagonist. Then, a friend suggested that he use Ender from a novella he wrote once. Thus, Ender's Game was expanded into a full-fledged novel with a chapter added to transition into Speaker for the Dead in order to avoid starting Speaker with a lengthy introduction of the character.
The first two Chip Harrison novels by mystery writer Lawrence Block aren't mysteries at all- being coming of age stories/sex comedies about the eponymous character's quest to lose his virginity. However, in part because once that happened, there was no forward momentum, Chip was retooled to be the assistant to an eccentric detective named Leo Haig, and the stories were retooled to be a Nero Wolfe pastiche, while still keeping some of the original sex comedy tone.
P.C. Hodgell's Chronicles of the Kencyrath series starts out in Low Fantasy territory in the first book, God Stalk; while there's foreshadowing there, the wider High Fantasy plot doesn't really emerge until the second book, Dark of the Moon. The shift alienated some readers, who wanted more of the same style of book as the first.
In Jeff Lindsay's Dexter series, about a serial killer who only kills bad guys (on which the TV show of the same name was based), the first two books (Darkly Dreaming Dexter and Dearly Devoted Dexter) are mainstream crime thrillers aside from the unusual protagonist, but the third (Dexter in the Dark) takes a sharp left turn into dark fantasy territory, pitting Dexter against supernatural forces, ancient conspiracies, and Cosmic Horror Story.
The Dinosaur Lords does a full Form Shift in the epilogue, turning from prose to drama - the final conversation is presented like a scene from a play.
A story Distant Rainbow by the Strugatsky Brothers starts as a funny story about peculiar scientific experiments and shifts into a story about an apocalypse halfway through, as their experiment has Gone Horribly Wrong.
The Discworld series started off as fairly straightforward parodies of Heroic Fantasy. Later novels have been much more heavily focused on social satire, with heavy emphasis on philosophy and topics such as morality, class warfare, religion, theoretical physics, and modern city life. It works because they're still bloody hilarious.
In the novel I Am Not a Serial Killer, the first half of the novel is a character study and murder mystery as a psychopathic teen tries to 1. prevent himself from becoming a murderer while maintaining the façade of normalcy with his family and "friends", and 2. investigate the actual murders that have been happening in his small town. The genre takes a sudden turn when it's revealed that the actual murderer is a literal demon.
In Fury Born is an expanded edition, if you will, of the Science Fantasy novel Path of the Fury. In the original novel, the introduction of the Greek Fury Tisiphone, a supernatural being who possesses the main character, happens in the first chapter. However, the expansion relegates the original novel to being the second half of the book, and the new first half, apart from a few brief, cryptic interludes involving said supernatural being, is pure Military Science-Fiction, making the shift a surprise for those who aren't expecting it.
The Strugatsky Brothers novel Inspector Glebsky's Puzzle starts off as a Closed Circle whodunit, where a police inspector is trying to find out the culprit behind two macabre murders in a hotel... and then near the end it turns out that several of the hotel guests are aliens, and the "murder victims" are deactivated humanlike robots. Worth noting is that the video game adaptation spoils the twist right on the cover by putting a flying saucer on the box.
Happens fairly early on in The Lord of the Rings. The first chapter, and parts of the second, are very comical and whimsical, except for Gandalf's confrontation with Bilbo, whereas the rest is much more dark and grim. This has a lot to do with Tolkien trying to write a sequel to The Hobbit by editorial mandate, but giving that up pretty early in favor of something connected to The Silmarillion (which said Editor rejected). Even then, after the Fellowship splits, each character's story is, in many ways, a different genre, ranging from modern stories concerning war and morality to epic tales in a more medieval vein. These changes were more intentional than the shift out of a children's story, as Tolkien toyed a lot with the difference between medieval and modern works.
Stephen King's Mercedes Saga gradually shifts genre. The first entry, Mr. Mercedes, is a hard-boiled detective story with absolutely no paranormal or supernatural elements. The second book, Finders Keepers, also largely sticks to this genre, until the very end, where it is revealed that Brady Hartfield (the villain from the first book) has gained telekinetic abilities after awakening from his coma. This sets up the third book, End of Watch, in which Brady is once again the villain and fully uses his new psychic powers. And finally, the fourth installment, The Outsider, completely ditches the human villains and gives the series its first Eldritch Abomination.
Misery: In-universe example. Paul Sheldon writes a series of cheesy romance novels featuring a Victorian bimbo named Misery Chastain. He despises the character for being a Canon Sue and only continues writing her because it's his flagship series and the money it makes goes into the kids' college fund, so he has her killed off via Death by Childbirth. When his greatest fan (who is also Ax-Crazy) finds out, she demands he write a new book bringing her Back from the Dead that directly follows from the last one (he at first tries a straight Retcon but she dismisses it as cheating). He eventually comes up with the idea that Misery fell into a coma due to a bee-sting and was Buried Alive, in effect turning the story into a Gothic Psychological Horror which reveals dark secrets in Misery's family line and the town. Paul eventually comes to the conclusion that this is the best book he has ever written.
This is part-and-parcel of the premise of Mistborn as a fantasy "trilogy of trilogies" set each several hundred years after the previous in a world where Medieval Stasis is not in effect. Mistborn: The Original Trilogy is High Fantasy; the Wax and Wayne series (bridge books between trilogies one and two) is a quasi-Victorian mystery/adventure with fantastic elements and a vaguely steampunk aesthetic; the second full trilogy (as yet unwritten) is slated to be Urban Fantasy; and the third trilogy is set to be Space Opera.
In Greg Egan's Orthogonal trilogy, the first book is highly plot-oriented, but has little action aside from the launch of the Generation Ship. The second book is a highly-technical romp through the science of the trilogy's universe, in which not much actually happens aside from a brief kidnapping plot for the climax, which is over nearly as soon as it begins. In contrast, the third book is fairly action-packed. It's rife with sabotage, thoroughly-justified Timey-Wimey-ness, questionably Well-IntentionedTerrorists, and more than a few explosions (none of which are accidental, or have anything to do with Antimatter, unlike in the previous books).
Out of the Dark by David Weber is expanded from a short story he wrote. The genre shift doesn't take place near the end, resulting in a cry of Twist Ending or Deus ex Machina. The original short story shifts about halfway through, the issue, though, is that the novel's expansion of the story is entirely before the events, resulting in 90% in the first genre of hard scifi alien invasion. The last 10%, however, involves Dracula.
Nikolai Gogol's classic short story "The Overcoat" is set in nineteenth-century Russia and appears to have no elements of the supernatural at all. Then, in the last few pages, the main character dies and comes back as a zombie.
The Tortall Universe format shifts from Fantasy-Adventure to Fantasy-Police Procedural with the Beka Cooper trilogy. It's also the first time we see Tortallan life from the commoners' point-of-view.note Yes, Daine is technically a commoner, but she's in the King's inner circle and a demigod so she's not exactly ordinary folk.
Circleverse: The Circle Opens quartet is also crime novels; each plot has the protagonist and student becoming entangled with a local crime spree assassinations, gang murders, arson, and serial killings, in that order.
Ranger's Apprentice begins in classic fantasy style - a young orphaned hero has to fight against an evil sorcerer controlling an army of monsters. However, in later books there's not a shred of the fantastic to be seen; indeed, one story deals with an old man using primitive science to fake magic.
Rant by Chuck Palahniuk is a fictional oral biography of... well, that's just it. He's an interesting character, but what we're supposed to think is significant about Buster Casey changes rapidly. There's a brief mention early on of a rabies epidemic, but by the end it's revealed that he is his own adopted father, and biological father, and grandfather, and great-grandfather, and the villain, via car accident induced time travel. In addition, it's not until an offhand remark by a character about a third of the way into the book about ports in the back of people's heads that you realize it's a sci-fi story set in the future.
While the first book in The Ring trilogy is a strictly horror story, the second is pretty much a medical mystery, and the third is just straight-up sci-fi. Complete lack of horror elements and tremendous amount of infodumps can come as surprise for those who read the novels after the (much more popular) movie adaptation.
The Saga of the Noble Dead starts off looking like a very standard "vampire hunter" story that happens to have a High Fantasy setting rather than the more common modern one. From the end of the second book on, it becomes obvious that this is, in fact, a High Fantasy epic that happens to heavily involve vampires.
Almost every Vonnegut's novel is that. His books are notable for creating a complex and interesting premise... only to toss it out midway through the book and tell a story in a completely different genre.
The Hedge Knight, the first of Tales of Dunk and Egg prequel series for A Song of Ice and Fire, shifts the story away from the Epic Fantasy of the original to a romantic story of an up-and-coming knight who has smaller stakes and local conflicts. It's a more straightforward an exploration of a chivalric code than the main series.
Dale Brown books: The Tin Man was the first one to be almost entirely focused on the dirtside perspective, unlike previous titles that were almost solely the flyboys' game. More infantry-centric content started creeping in after that.
Worm starts out as a fairly dark and somewhat cynical take on the superhero genre from the perspective of a teenage girl who more or less accidentally becomes a supervillain. Then, when the first Endbringer appears, it suddenly shifts into apocalyptic gear. After that, when the Slaughterhouse Nine appear, it's almost straight horror.