Ballesteros, whose life was saved by surgery after the discovery of a brain tumour 20 months ago, was hoping to play in the eve-of-championship four-hole Champions Challenge.
It would have been a tear-jerking return to the scene of his 1984 victory - perhaps the highlight of his glittering career - but the 53 year old has accepted doctor's advice not to subject himself to emotional stress.
Ballesteros said on his website: "I very much wanted to be at the British Open in St Andrews next month to personally thank all the golf fans and friends who have given me their support - not only during these two years when I have been recovering from my illness, but also to thank them for the affection they have shown during my golf career.
"I am aware that there might be people who have been preparing their trip to encourage and cheer me up.
"Hence, I do not want to disappoint anyone at the last minute and after listening to the doctors' advice I have taken the difficult decision not to travel to St Andrews."
Sir Nick Faldo, who was hoping to partner Ballesteros in the Wednesday competition, commented: "I think I will try to call him as soon as possible - he must be rough.
"I tried to see him in November and he said 'I'm not good enough for that'. I said to him 'let's go putting - at least we can do that'.
"It's a real shame and I send all my messages for the universe for him. I want to see him."
Ernie Els, like Faldo playing at the BMW International Open in Munich, added: "He's the greatest and it's a shame. Hopefully he will be fine."
Sergio Garcia stated: "It's a tough illness and you never know what is going to happen. It's obviously disappointing - we were hoping he was getting better."
The website statement said that Ballesteros had undergone tests this week back at the Madrid hospital where the brain surgery was carried out after his collapse at the city's airport.
"These check-ups are routine and monitor the progress of the Spanish athlete following his diagnosis of a brain tumour in October 2008," it read.
"The medical team have informed him this morning that at this time he should not put himself under any undue stress or in potentially emotional situations.
"It is for this reason that they have advised him against travelling to St Andrews."
Dr Belda, the oncologist who looks after Ballesteros at La Paz Hospital said: "Despite the excellent general state that Mr Ballesteros enjoys, we do not think the trip to Scotland this coming July would be appropriate.
"It is important that Mr Ballesteros continues with a peaceful life and our advice has been not to travel to Scotland."