This question has been puzzling me and many others. Many say Sean Connery was the first in Casino Royale. But later I found out that there's no such movie with Sean Connery in the lead. Fortunately, my friend got a DVD of the first Casino Royale, which he promptly passed it on to me. Frankly, I didn't understand a thing in the movie. Because there were two James Bonds in it! One was Sir James Bond, played by David Niven, and the other just James Bond played by Peter Sellers.
So, i concluded that the first was David Niven, considering Sir James Bond to be the lead. But later, when I googled for info on the first James Bond, I realised that the first Casino Royale(1954) was aired in the form of episodes on CBS. And guess who was in the lead? Not David Niven, nor Sean Connery. It was Barry Nelson. But he isn't the first to play the role of 007 in a movie.
Sean Connery, David Niven, Peter Sellers, Barry Nelson... So who is it? I would say if your question is, who is the first to enact JamBo, I would say David Niven and Petter Sellers, but if you just ask me, who is the first James Bond, I'd surely say Barry Nelson.
Feels complicated, doesn't it?