Because James Bond was not that well known in 1961, producers Albert R Broccoli and Harry Saltzman originally sought to have a big name star as James Bond. Cary Grant was chosen for the role, but was not selected due to his commitment of only one feature film (it is also said that Grant refused the part because, then 58, he felt he was too old for it).
Other actors purported to have been considered for the role include Patrick McGoohan (on the strength of his portrayal of spy John Drake in the TV series Danger Man; it is frequently reported in histories of his later TV series The Prisoner that he turned the role down on moral grounds), James Mason, and David Niven (who would later play an unofficial version of the character in the 1967 spoof Casino Royale).
There are a lot of apocryphal stories as to who Ian Fleming personally wanted. Some sources, specifically Albert R Broccoli from his autobiography When The Snow Melts, claim that he favored Roger Moore due to having seen Moore as Simon Templar on the television series The Saint; however, this story is often debunked by fans pointing to the fact that the series did not begin airing in the United Kingdom until October 4, 1962 — only one day before the premiere of Dr No.
It is known for sure that Fleming wanted Noel Coward for the role of the evil Dr Julius No and David Niven for the role of Bond, both of whom he knew personally. Moore wasn’t linked publicly to the role of 007 until 1967 in which Harry Saltzman claimed he would make a good Bond, but also displayed misgivings due to his popularity as Simon Templar. Moore was finally selected as Bond in 1973 for Live and Let Die.
Ultimately, the producers turned to Sean Connery, a relative unknown at the time to play agent 007 for five films. It is often reported that Connery won the role through a contest set up to ‘find James Bond’ – while this is untrue, the contest itself did exist, and six finalists were chosen and screentested by Broccoli, Saltzman, and Fleming. The winner of the contest was a 28-year-old model named Peter Anthony, who according to Broccoli had a Gregory Peck quality, but lacked the technique to cope with the demanding role of Bond.