The Trainspotting and Slumdog Millionaire filmmaker was rumoured to be involved and has previously spoken about working on a script for the movie, which will see Daniel Craig back as 007.
In an official statement, EON Productions confirmed that Boyle had signed up, saying that production on the 25th Bond film will begin in December.
The as yet untitled film - due for release in the UK on October 25 next year - will be Craig’s fifth outing as 007.
Producers Michael G Wilson and Barbara Broccoli said: “We are delighted to announce that the exceptionally talented Danny Boyle will be directing Daniel Craig in his fifth outing as James Bond in the 25th instalment of the franchise.
“We will begin shooting Bond 25 at Pinewood Studios in December with our partners at MGM and thrilled that Universal Pictures will be our international distributor.”
Oscar winner Boyle will direct from an original screenplay by John Hodge, who also worked on Trainspotting.
Boyle previously said of the rumours: “We’re working on a script at the moment and we’ll see what happens.
“But it’s a great idea so hopefully it’ll work. I’d love to be able to tell you more but I’m not going to,” he told the Associated Press.
The film is expected to be Craig’s last time playing the spy, having previously starred in Casino Royale, Quantum of Solace, Skyfall and Spectre.
He previously stated that he would rather “slash my wrists” than return to the role, but later said that he made the remarks two days after he finished shooting Spectre and was exhausted.