The spooky snap appears to show a shadowy figure looking from the first-floor window of the former hospital - despite it being closed for more than 15 years.
The asylum in Bronllys, Brecon, Wales was also a PoW camp in the Second World War where captured German soldiers were kept.
After the war it housed psychiatric patients who were sometimes lobotomised for conditions like postnatal depression, alcoholism and senile dementia.
At least one patient is known to have died on the site from a pre-frontal lobotomy which saw part of the brain damaged by cracking open the skull and severing nerves.
The spooky image was taken by walker Adam Smith as he strolled past the outside of the crumbling, moss-covered building.
He said: "I caught an epic shot of a ghost at the abandoned Brecon and Radnor Lunatic Asylum.
"Maybe it was a patient who had a lobotomy or perhaps a soldier patient from the war or maybe a Nazi prisoner.
"Whatever it was, it certainly gave me a fright."
He added: "Since I uploaded the post it went viral.
"I started to get messages from local residents and councillors asking me that I remove it because 100's of people were turning up at the hospital to try to find the ghost."