Royal Birkdale will stage the Open for a 10th time in July 2017, having first done so in 1954.
The 2018 event will mark Carnoustie's eighth time as host, dating back to 1931 when Tommy Armour won at the Angus links.
This year's Open will be held at Royal Liverpool from 17-20 July, with Phil Mickelson the defending champion.
Five-time Open Champion Tom Watson, who won the event at Royal Birkdale in 1983 and at Carnoustie in 1975, said: "I am delighted to see the Open returning to two great venues in Royal Birkdale and Carnoustie.
"I know both courses are held in high regard by the players and I certainly consider them to be wonderful tests of golf."
Watson will make his 40th anniversary appearance at the tournament after receiving a full exemption as a past champion who finished as runner-up in 2009.
The 64-year-old said he was "proud and honoured" to be given the opportunity.
Padraig Harrington clinched back-to-back Open titles when the two courses last staged the tournament.
The Irishman lifted the Claret Jug at Carnoustie in 2007 after defeating Sergio Garcia in a play-off and a year later triumphed at Royal Birkdale by four shots from Ian Poulter.
Royal Birkdale and Carnoustie will host the Open Championship in 2017 and 2018 respectively, the R&A has announced.