Timothy Dalton was originally considered for the role of James Bond in the late 1960s, after Sir Sean Connery left the role, following You Only Live Twice (1967). Dalton was screentested by Albert R. Broccoli for On Her Majesty's Secret Service (1969), but he turned down the part, as he thought he was too young. He was also considered for Diamonds Are Forever (1971), but turned it down again, still feeling he was too young. He was considered again for the role in For Your Eyes Only (1981), when for a while, it was unclear whether Sir Roger Moore would return. However, Dalton declined at that time, as there was no script (or even first draft). Dalton was offered the role again in 1983 for Octopussy (1983), and yet again in 1985 for A View to a Kill (1985), but had to decline the role both times due to previous commitments.
The casting of Frederick Warder and Glyn Baker as 004 and 002 was intentional, due to their resemblance to George Lazenby and Sir Roger Moore, respectively. For the movie's opening scene, the writers wanted to toy with the audience's expectations of which of the 00 agents was Bond.
Timothy Dalton was originally unavailable to play Bond, and Pierce Brosnan was then chosen to play 007 in 1986, and was given the script to this movie. Although he was contracted to Remington Steele (1982) for seven seasons, NBC decided to cancel the show at the end of the fourth season, which meant that Brosnan was free to play James Bond in this movie the following year. However, shortly after the end of the fourth season, NBC had second thoughts about cancelling "Remington Steele", and subsequently approached the Bond producers directly in an attempt to strike a deal that would allow Brosnan to play James Bond and Remington Steele the following year. NBC also offered to completely reschedule the shooting of Remington Steele to ensure that there were no scheduling conflicts. But eventually, Albert R. Broccoli famously told NBC that "James Bond will not be Remington Steele, and Remington Steele will not be James Bond." Accordingly, Brosnan would only play Bond if the show remained cancelled. NBC had a sixty day deadline to revoke their decision to cancel the series, and at 6:30 p.m. on the sixtieth day of the deadline, Brosnan learned that NBC decided to make a fifth season. The Bond producers subsequently prevented Brosnan from becoming the next James Bond. Subsequently, the role went to Timothy Dalton, who was now finally available. NBC went on to make only six episodes of the fifth season of Remington Steele (1982) before finally cancelling the show for good.
A stuntman was originally going to play the role of the SAS man who's rope is cut by The Imposter (played by Carl Rigg), the Russian assassin in Gibraltar at the beginning, but after watching rushes, director John Glen decided that they needed a real actor for the part, and it was given to another actor. At the time, this actor was out of work and staying home, taking care of his baby, while his wife was away on business. Upon getting the call, he left the baby with a neighbor, left his wife a note telling her he'd gone to be in a James Bond movie, and caught the next plane to Gibraltar to start filming.
John Barry: The composer appears as the conductor of Kara's (Maryam d'Abo's) orchestra in the final scene.
Michael G. Wilson: At the opera, sitting near Saunders, to the right of the lady with a white dress.
John Glen: [pigeon] When Bond infiltrates Brad Whitaker's mansion premises late in the film, whilst stealthily moving through the garden, he is startled by a white pigeon.