Andrew Dahl, recent transfer to the starship "Intrepid", realizes he and his friends are characters on the show, and embarks on a crazy plan to tell the show's creators in order to lower the ship's incredibly high deathrates. Andrew Dahl, Maia Duvall, Jimmy Hanson, Finn, and Hester (who initially have last names only, which is a plot point) are transferred to the Universal Union flagship. Dahl quickly realizes that the more experienced crewmembers are unreasonably evasive about the deaths of other junior crew members on away missions, and upon conferring with his new friends, realizes that this is a universal aboard the "Intrepid."
In addition, it becomes clear that the laws of physics are sometimes suspended without explanation. For example, a machine known only as "The Box", located in the Xenobiology lab, is able to create vaccines far more quickly than should be physically possible, and it is possible to time travel through black holes as long as one of the highest-ranking officers of the ship is involved.
Dahl and his friends investigate, and in doing so, they encounter a reclusive crewmember named Jenkins who has pieced together more of the story. The number of injuries and deaths suffered by the flagship's crew members is extraordinarily high, only matched by one other ship in history—the "Enterprise," of Star Trek fame.
After Finn dies in an explosion that nearly kills Dahl, and which makes very little sense even to the characters involved due to in-universe improbable plotting, Dahl, Hester and Duvall decide they must find a way to confront the show's creators and get them to stop killing off the flagship's crew. The trio abduct Anatoly Kerensky, the flagship's astrogator, and take a shuttle through a black hole and back to the year 2012, using Kerensky's plot armor as one of the main characters of the television show to bend the laws of physics and survive the trip.
In 2012 Burbank, the four shipmates talk to a series of actors and finally manage to speak with one of the show's top writers, a man whose beloved son was recently involved in a motorcycle accident and who isn't expected to wake up again. They devise a plan to substitute out the injured young man for the bit part he played, leaving Jasper Hester in 2012 and bringing his 2012 counterpart back to the "Intrepid," where the futuristic medical technology aboard the ship repairs the man's injuries. The Narrative takes over once more, and when the man wakes up, he's Jasper Hester again, and the writer's son back on Earth is fully recovered. This fulfills their part of the bargain, and the writer resolves to kill off fewer characters on the show.
The book has several endings. One ending has to do with the crew of the "Intrepid," who live considerably less deadly lives now that the writer is reaching beyond the "easy dramatic moments" that cheap deaths cause and working to develop more emotionally important conflicts. Another ending has to do with the writer's son, who has to come to terms with the impossible way in which his life was saved. And the last ending deals with the woman who played an extra in an early episode of the show, who learns of Jenkins's love for her show-era counterpart, and who eventually meets and befriends the actor who played Jenkins.
Best part of story, including ending:
The premise was amusingly executed, and several characters (not just Andrew Dahl, the focus character) were consistently funny.
Best scene in story:
There's an excellent bit where Dahl has to bring a biological sample to the bridge, and the interaction (as another character has already predicted) is trope-filled, dramatic, and ridiculous. The transition into the next chapter is pretty glorious because Dahl notices that another character, who was recently on the edge of death, has recovered far faster than he should (due to the show's writers manipulating the setting), and Dahl's internal narration points out how unreasonable this is. It's very self-aware humor, both in the scene itself and in the transition immediately following it.
Opinion about the main character:
Ensign Dahl is investigative. When people stonewall him or try to pretend that an insanely high deathrate is just business as usual, he finds ways to go around them. I like persistent, curious characters in general, and Dahl was very amusing as well, so it was easy to enjoy reading about him.