This post contains spoilers for both Hamlet and Brave New World.
In Chapter 8 in the midst of John's history in the reservation, he acquires The Complete Works of William Shakespeare, which - in a way - give him the language to express his thoughts. At the same time, it's explained how he hates Popé, one of the Indians on the reservation with whom his mother Linda spends a lot of time. It's kind of hard to tell whether Shakespeare helps John in articulating his hate for Popé, or whether John starts hating Popé because of what he reads in Shakespeare and how similar it is to his own situation. In any case, his hating Popé is accompanied with two Shakespeare quotes:
Nay, but to liveAnd, when John's thoughts turn to murdering Popé:
In the rank sweat of an enseamed bed,
Stew'd in corruption, honeying and making love
Over the nasty sty
When he is drunk asleep, or in his rageBoth of these are from Hamlet. The first ("Nay, but to live...") is in Act III, Scene IV (lines 103-106), when Hamlet talks to Gertrude about her marrying Claudius so soon after King Hamlet's death, and the second ("When he is drunk asleep...) is at the very end of Act III, Scene III (lines 92-93), when Hamlet resists killing Claudius because Claudius is praying (and Hamlet thinks that killing him in the midst of prayer will send him to Heaven, which Hamlet wants to avoid), so he thinks of better opportunities to kill him.
Or in the incestuous pleasure of his bed
The characters in Brave New World sort of match up to the rôles in Hamlet. John is Hamlet. His mother Linda is Gertrude. Popé is Claudius. But the rôle of King Hamlet could be fulfilled by either Thomas (the Director of Hatcheries and Conditioning), who is John's biological father, or - more broadly - the "civilized" society of England itself. (I think the broader application is more useful.) In both works, the son tries to kill his mother's new partner, and because Hamlet does this at the behest of the Ghost of King Hamlet, the parallels suggest that, in trying to kill Popé, John aligns himself with his father figure - England, including its "civilized" values of conformity and possibly even its caste system. In the reservation, John and Linda stick out, and through John's attempts to complete the Indians' rituals, it's obvious that he's trying to fit in. Before he sees England firsthand, he thinks it will provide him with that sense of belonging.
The parallels beyond that get sort of confusing, and they might even break down after that scene. Like Hamlet, John dies at the end, but where Hamlet is (at least relatively) successful in avenging his father by killing Claudius, John turns away from his father figure - the society that bred him. He doesn't have the strength to reform - or even resist - the "civilized" England and hangs himself. At the end of the book, when he's discovered dead, his feet "turned towards the right: north, north-east, east, south-east, south-south-west; then paused, and, after a few seconds, turned as unhurriedly back towards the left. South-south-west, south, south-east, east...." This is similar to Hamlet's "I am but mad north-north-west. When the wind is southerly I know a hawk from a handsaw" (II.ii.388-389), but I'm not sure of the depth of the resemblance. I don't think I can make a very strong case for the southerly direction that John's feet point for most of the description and their connection with Hamlet's ability to "know a hawk from a handsaw" (i.e. that John was the only sane person in a land of crazy people), but at the very least, John's feet's directions - combined with that Hamlet quote - illustrate the conflict within him - whether he would adopt the ways of "civilization" or renounce them. It could also represent the split nature of his being - his parents were from the "civilized" society yet he was raised as a "savage" in the reservation.
I think there's also a lot to be said between the two works about what's natural and what's artificial. The conditioning in Brave New World seems to have some precedent with the differentiation of "seems" and "is" in Hamlet, but I'd have to re-read both again in order to pay attention to those specific points. Additionally, in the same way that John can be cast as Hamlet, I think he bears some resemblance to Miranda from The Tempest (beyond just their shared excitement about a "brave new world"), but I think it's been two years since I last read The Tempest, so in order to support that claim I'd have to reacquaint myself with that too. Reading Brave New World this time, I was paying attention mostly to the characters' connections to Hamlet.