The song was recorded in three takes on 2 July 1969, prior to the Beatles beginning work on "Golden Slumbers/Carry That Weight". McCartney sang and simultaneously played a fingerstyleacoustic guitar accompaniment. The decision to exclude it from the Abbey Road medley was made on 30 July. It runs only 23 seconds, but the Beatles also recorded a longer version during the Get Back sessions.
Structure and placement
The song was originally placed between "Mean Mr. Mustard" and "Polythene Pam"; McCartney decided that the sequence did not work and it was edited out of the album's closing medley by Abbey Road Studiostape operator John Kurlander. He was instructed by McCartney to destroy the tape, but EMI policy stated that no Beatles recording was ever to be destroyed. The fourteen seconds of silence between "The End" and "Her Majesty" are the result of Kurlander's lead-out tape added to separate the song from the rest of the recording. The loud chord that occurs at the beginning of the song is the ending, as recorded, of "Mean Mr. Mustard". "Her Majesty" ends abruptly because its own final note was left at the beginning of "Polythene Pam". McCartney applauded Kurlander's "surprise effect" and the track became the unintended closer to the LP. The crudely edited beginning and end of "Her Majesty" shows that it was not meant to be included in the final mix of the album; as McCartney says in The Beatles Anthology, "Typical Beatles – an accident." The song was not listed on the original vinyl record's sleeve as these had already been printed; on reprinted sleeves, however, it is listed. The CD edition corrects this. The CD version also mimics the original LP version in that the CD contains a 14-second long silence immediately after "The End" before "Her Majesty" starts playing. Digital versions also include a 14-second long silence after "The End". At 23 seconds long, "Her Majesty" is the shortest song in the Beatles' repertoire. Both of the original sides of vinyl close with a song that ends abruptly. The song starts panned hard right and slowly pans to hard left. In October 2009, MTV Networks released a downloadable version of the song for the video game that gave players the ability to play the missing last chord. Apple Corps granted rights to this and to other changes to Harmonix Music Systems, which developed the game. The alteration garnered controversy among some fans who preferred the recorded version's unresolved close. The fiftieth anniversary "Super Deluxe Edition" of Abbey Road includes a bonus track, "The Long One" that consists of a trial edit and mix of the medley, with "Her Majesty" placed between "Mean Mr. Mustard" and "Polythene Pam".