Everything in the world has an origin, a beginning to an inevitable end, somehow or another. Objects and techniques which are commonplace today, like shoes, coffee mugs, and pressing a finger to one's upper lip to prevent a sneeze, had to be invented by somebody at some time. (This is assuming for the sake of argument that time and space are not a complete illusion.) So it seems to me that yogic practice in general, and meditation in particular, had to be invented by someone, probably way back in prehistoric times. This essay will consider what I consider to be some of the more likely origins of what has come to be an array of techniques, some of them very refined, for purifying the mind, increasing its power, and/or cultivating deep insight.
Gazing into a campfire. Anyone who does much camping knows the hypnotic fascination of staring into a campfire. Watching the flames flickering and dancing can seem just as interesting as (and much less of an insult to one's intelligence than) watching television. It has a soothing and genuinely hypnotic effect---which I hypothesize is a kind of animal instinct in the human animal for keeping us safely near the campfire instead of wandering out into the darkness where the wolves and leopards are. The hypnotic state of glassy-eyed vegetation in front of TV sets around the world may be in part due to a misplaced campfire-gazing instinct. Much as an instinct for preferring sweet food arose from the fact that in prehistoric times sweet food was nutritious, like ripe fruit, but then was perverted into a liking for relatively junky, non-nutritious doughnuts and candy bars, even so our instinct for gazing at flickering lights at night, which was valuable for someone a hundred thousand years ago, has been perverted into a habit of sitting vacantly in front of morally bankrupt sitcoms, crime dramas, and prolonged commercials. Consequently, although watching a campfire obviously could be called a kind of relaxing meditation, similar to watching a goldfish silently gliding around and around in its bowl (which is actually prescribed by some psychologists as a stress reliever for overworked business people), the meditation would be of a relatively elementary "trance" type, and would perhaps not be the most likely candidate for the prototype of such advanced meditation techniques as mindfulness of breathing or the mantra "AUM." I have read, however, that yoga teaches a meditation technique involving gazing at a flame; and "fire kasina" is one of the forty traditional tranquility meditation practices taught in Theravada Buddhism.
Shamanistic practices. There were plenty of shamanistic rainmakers, priestesses, and "witch doctors" practicing their arts in human societies during the Stone Age, and some of their practices may have eventually culminated in the contemplative traditions of Buddhism, Hinduism, Christianity, Sufism, etc. Some of these practices which appear to be plausible ancestors of yoga are group ceremonies, drugs, and vision quests, which I will briefly consider in turn.
It is well known that people in tribal cultures indulge in various group ceremonies---celebrations, prayers to the spirits, manhood rituals, etc.---in which many members of the tribe will dance, sing, or chant in unison until a kind of "group mind" has been established. Sometimes people will participate until they collapse in states of intense feeling or ecstasy, and some in these states will speak in tongues or prophesy for the benefit of the tribe. The pounding drums, the synchronized union of bodily movements and voice, and the intensity of the group atmosphere, bring them into a trancelike, even mystical state which is considered to be bonding and therapeutic. Also, especially at rites of passage, profound altered states of consciousness help to integrate young members of the tribe into more of a group awareness, a uniformity of thought and feeling with the others that has obvious survival value in a dangerous world. I think the chanting performed at some of these ancient ceremonies may have been a precursor of mantra meditation at least.
Shamanistic use of mind-altering drugs like peyote or the mushroom Amanita muscaria is another possible origin of sitting cross-legged on a round black cushion. Many of the more powerful drugs with psychedelic effects may induce profound expanded states of consciousness, which may have been sufficient in and of themselves for centuries, then heightened by more or less yogic techniques like bodily postures and breath control, until the drugs themselves were finally considered unnecessary. Many modern spiritual seekers in the West have recapitulated this evolutionary scheme by starting with psychedelics, and then seeking non-chemical means to produce similar expanded states of consciousness. Possibly more than half of Western Buddhist monks have begun this way. At least that seems to be the case in my generation.
The vision quest, a kind of solitary rite of passage, is another tradition sometimes entering well within the range of meditative mysticism. An example of a simple vision quest is one my father told me of when I was a boy. He had a friend in Alaska named Frank Walunga, an Eskimo shaman and part-time longshoreman. During the mid 20th century his initiatory vision quest as an apprentice shaman, so to speak, consisted of the following procedure: He walked out into a wilderness alone, and sought out a smooth round rock about the size of an orange that fit well in the palm of his hand. Then he sought out a large, smooth, flat rock. He sat down at the flat rock and rubbed the small round one around and around (and around and around…) on the surface of it. He continued rubbing the rock in a circle without eating, drinking, or sleeping, until he had his "experience." The process took a few days. Now from the Buddhist point of view this would definitely be considered a samatha meditation practice, a technique for emptying the mind of limiting, distracting perceptual content. It is still more of a "trance" technique than one a Theravada Buddhist would consider conducive to the arising of liberating insight, however.
Incidentally, I will add that according to my father, some Eskimo shamans did have the ability to enter very deep trance states, and some apparently had astonishing psychic powers. For example he told one story of an old shaman who would go into trance states so deep that his heart rate and breath rate would approach zero, as with a hibernating animal or a Burmese meditator in deep jhāna, and so the local law enforcement agencies had been cautioned that if anyone brought in a dead old Eskimo man they shouldn't immediately assume that he was necessarily really dead. The old man had a way of going into his evidently cataleptic states just about anywhere, including alone in the wilderness, or sitting by the side of the road. Furthermore, the old man had a reputation for being able to teleport physically while in such states. Anyway, one day in southwest Alaska a supposedly dead old Eskimo man was brought into a sheriff's office. The sheriff knew the stories, so to be on the safe side he put the apparently lifeless body in a jail cell and locked the door. Then he made a radio call to another sheriff's station on a nearby island to get more information, if possible, on the appearance of the old shaman. When he described to the other sheriff the old man brought in for dead, he was told that that certainly sounded like the one---but it couldn't possibly be him, because the old shaman had just walked in the door and requested that the first sheriff be informed that he was all right. The first sheriff went back to the jail cell and found it empty. The old shaman, presumably, disappeared from a jail cell at one sheriff's station and reappeared at a different one on an island many miles away. Anyway, that's the story. Similar anecdotes are told about modern yogic meditation masters like the Hindu Neem Karoli Baba.
Stone Age "hunting magic." Long ago I read an interesting theory in the book Earth House Hold by Gary Snyder, one of the great captains of the Beatnik movement of the late 1950's. Snyder's theory is that meditation evolved out of prehistoric hunting practices. It is a common belief among "primitive" peoples that animals can sense our thoughts. (My father, who hunted much in Alaska, agreed with this. He said that stalking a moose is almost impossible; the wary moose will detect one's presence and take off almost every time. But if one sneaks up on a tree next to the moose it becomes as easy as hunting cows. According to him, the moose somehow knows when someone is paying attention to it.) As a result of this, Stone Age hunters would wait in ambush by the side of a game trail for hours keeping their mind almost completely silent. (This was very likely much easier for them to do than for compulsively thinking modern Westerners like most of us; even modern Burmese villagers seem to have about one-third as many thoughts going through their head as we have. It may have its drawbacks, but it makes meditation much easier.) Skillful hunters couldn't possibly go into a trance, however, as it would be pointless to become cataleptic when one needs to be as alert and ready for the chase as possible. This state is essentially a form of what the Roman Catholic mystics call contemplation: a state of silent watchfulness. This also is an excellent meditative technique for increasing the likelihood that deep insight will arise. It is not just a hypnotic trance state like one may easily experience while staring at a fire, but is an expanded, hyperconscious state. How it evolved into jhāna in the full lotus position, however, I cannot guess.
Incidentally, the idea of Eskimos and other hunting peoples developing deep contemplative techniques and even psychic powers seems to challenge the traditional Buddhist view that such exalted states necessarily arise from a morally purified and saintly mind which wouldn't think of killing another conscious being. It may be that people, some people at least, from preliterate and pre-technological societies already have the firm foundation of a quiet, uncluttered mind which we who are "civilized" must deliberately cultivate through morality and increased simplicity. Or perhaps once we lock ourselves into a moral system we find ourselves required psychologically to play by its rules. (Consider the tribulations of Raskolnikov in Dostoyevski's Crime and Punishment, or those of Colonel Kurtz in Apocalypse Now, when they tried to leave established morality behind.)
There are countless other possibilities for the origins of meditation. Perhaps from time to time a spiritual genius arises who is simply "ripe" for the cultivation of advanced states of consciousness and stumbles upon some meditation method, which he or she then teaches to others. Traditionally, Gotama Buddha is considered to have accomplished this not with meditation itself, as it obviously already existed, but with meditation capable of leading to full enlightenment. Or perhaps some of the followers of the New Age are correct, and extraterrestrial beings brought meditation to this world. However it got here, it is very likely that some form of it existed in various cultures throughout the world even in prehistoric times, and that it was developed into an advanced spiritual system in the Indus Valley Civilization of very ancient India, from which most yogic traditions of India are derived, and from which the modern world has been profoundly affected. For this we should be grateful, for it gives us a conscious alternative to the Brave New World that threatens to overwhelm us if we are not watchful.