Mary Goodnight first appeared as 00-Section secretary in the Ian Fleming novels On Her Majesty's Secret Service, You Only Live Twice and The Man with the Golden Gun. In 1974 the character appeared in the film adaptation of The Man with the Golden Gun as an inexperienced field operative. She was portrayed by Britt Ekland.
Miss Goodnight is a Secret Service staffer, more ditzy than in the novels, who assists Bond when he is following Andrea Anders in Hong Kong. Very quickly it is established that she has as-yet unfulfilled desires toward Bond.
- Bond: "Now, Goodnight, would I do that to you? [Speaking of cheating on her.]"
- Goodnight: "Yes, James, you bloody well would!"
After Goodnight shows Bond where Miss Anders is staying, she hopes to spend the evening with Bond, but 007 declines, as he has his meeting with Hai Fat.
Later in the film, Goodnight is embarrassingly pushed into the wardrobe of Bond's hotel room when Miss Anders enters Bond's bedroom. Goodnight falls asleep in the closet as Anders and Bond have sex; after Anders leaves, Bond wakes Goodnight and condescendingly tells her "Your turn will come, I promise." After this event, Goodnight becomes cold in her attitude towards Bond, particularly when interacting with him in Scaramanga's presence.
- Goodnight: "(after being asleep in the wardrobe for two hours.) What time is it?"
- Bond: "Twoish."
- Goodnight: "Two? You mean I've been asleep in there for two hours?"
- Bond: "I was just finishing business."
- Goodnight: "Business? I'm resigning in the MORNING!"
At the meeting point with Miss Anders, Goodnight takes control of the Solex, but whilst placing a homer on Francisco Scaramanga's AMC Matador, she is pushed into the car's boot (trunk) by Scaramanga himself. Bond meets up with Goodnight on Scaramanga's island. She is present during the meal where Scaramanga proposes to Bond to confront him to a duel.
During the duel of the two, Goodnight is guarded by Kra. Eventually, she knocks the maintenance man into a pool of liquid helium. Bond and Goodnight manage to escape and after dealing with Nick Nack, Goodnight manages to finish what she started with Bond aboard Scaramanga's personal Chinese Dhow (slow boat from China).