Nicklaus last played in the British Open in 2000 when St. Andrews was also the host. That course was the site of two of Nicklaus' three British Open titles in 1970 and 1978.
Nicklaus, 65, played his last Masters in April and will lose his exemption to play in the British Open after this year's tournament.
"I expect I'll be just as emotional at St. Andrews. I'm a sentimental old fool," said Nicklaus, who was in Britain on a business venture.
"I don't consider myself competitive any more and the Open will probably end my competitive career."
Nicklaus has 18 professional major victories. In addition to three British titles, he won The Masters six times, the U.S. Open four times and the PGA Championship five times.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
Charlize Theron not engaged to Sean Penn 'yet'