The "Ghost in the Machine" is a metaphor in philosophy. The philosopher Gilbert Ryle called mind the Ghost in the Machine, and the idea that it was separate from the brain was the mistaken "official doctrine".
Overview
Ryle was referring to René Descartes' mind-body dualism. In dualist systems like Descartes', mental activity carries on in parallel to physical action, but the means of interaction are unknown or speculative. Ryle thought this was absurd, and as a kind of error which he called a "category mistake". It is like saying something like "cars move by motive spirit".
References
↑Ryle, Gilbert. 1949. The concept of mind. London: Hutchinson. p15–18 The absurdity of the official doctrine. ISBN0-226-73295-9
↑Pinker, Steven 2002. The blank slate: the modern denial of human nature. London/New York: Putnam Penguin. Chapter 1 The official theory: p8–11. ISBN0-670-03151-8
↑Descartes knew that Galileo's methods of scientific discovery could provide mechanical explanations for every occupant of space, but he was convinced that mental activities were not just a more complex variety of the mechanical.
↑Tanney, Julia 2007. "Gilbert Ryle", in Stanford Encyclopedia of Philosophy.