The man sacrificed a cat and was then buried in a shallow grave after instructing onlookers to dig him out once he gave a signal of pushing a sword he was carrying through the ground, police said.
"Even after three hours, there was no sign of the sword coming up from the grave," a local police official told AFP.
"That is when the onlookers decided to pull him out anyway, but he was unconscious," the unnamed official said.
The man had been requested to drive out demons feared residing in the home of a school teacher at the village of Pelanwatte.
More From This Section
"I saw him perform a ritual like this at a temple six months ago and invited him to check my property," the teacher, Wasantha Bandara, told local radio station Shree FM.
"He said I had bad luck because someone had sprinkled human ash at my house, but he could drive out evil spirits through this ritual."
Many in Sri Lanka, where 70 per cent of the population are Buddhists, have faith in black magic, sorcery and exorcism, and place great importance on astrology. Important state functions are held according to the auspicious times chosen by astrologers.