A contemporary of famous arhats such as Subhuti, Sariputra, and Mahakasyapa, he is considered the second of the Buddha's two foremost disciples (foremost in supernatural powers), together with Sariputra. He is a top master of supernatural powers. Maudgalyayana and Sariputra were once disciples of Sanjaya Belatthaputta, the skeptic, but they became disciples of the Buddha.
He was born in Kolitagama near Rajagaha, on the same day as Sariputta (they were both older than the Buddha), and was call Kolita after his village. His mother was a brahminee called Moggali (Moggallani) and his father was the chief, householder of the village. Moggallana's and Sariputta's families had maintained an unbroken friendship for seven generations, and so the chrldren were friends from their childhood. Sariputta had five hundred golden palanquins and Moggallana five hundred carriages drawn by thoroughbreds.
One day the two blends went together to see a mime play (giraggasamajja), and there, realizing the impermanence of things, decided to renounce the world. They first lived as disciples of Sanjaya, and then wandered all over Jambudipa, discussing with all learned men, but finding no satisfaction. Then they separated, after agreeing that whoever first succeeded in finding what they sought should inform the other.
After some time, Sariputta, wandering about in Rajagaha, met Assaji, was converted by him to the faith of the Buddha, and became a sotapanna. He found Moggallana and repeated the stanza he had heard from Assaji (ye dhamma hetuppabhava, etc.),and Moggallana also became a sotapanna. The two then resolved to visit the Buddha at Veluvana, after an unsuccessful attempt to persuade Sanjaya to accompany them. Sanjaya's disciples, however, five hundred in number, agreed to go, and they all arrived at Veluvana. The Buddha preached to them, and ordained them by the "ehi bhikkhu pabbajja.", All became arahants except Sariputta and Moggallana. Moggallana went to the hamlet of Kallavala (for details see Pacala Sutta, A.iv.B5f, where the village is called Kallavalamutta) in Magadha, and there, on the seventh day after his ordination, drowsiness overcame him as he sat meditating. The Buddha knew this, and appearing before him, exhorted him to be zealous. That very day he attained arahantship.
On the day that Sariputta and Moggallana were ordained, the Buddha announced in the assembly of monks that he had assigned to them the place of Chief Disciples and then recited the Patimokkha. The monks were offended that newcomers should be shown such great honour. But the Buddha told them how these two had for a whole asankheyya and one hundred thousand years strenuously exerted themselves to win this great eminence under him. They had made the first resolve in the time of Anomadassi Buddha. Moggallana had been a householder, named Sirivaddha, and Sariputta a householder, called Sarada. Sarada gave away his immense wealth and became an ascetic. The Buddha visited him in his hermitage, where Sarada and his seventy four thousand pupils showed him great honour. Anomadassi's chief disciple, Nisabha, gave thanks, and Sarada made a vow that he would become the chief disciple of some future Buddha. Anomadassi saw that his wish would be fulfilled and told him so.
After the Buddha's departure, Sarada went to Sirivaddka,and ,announcing the Buddha's prophecy, advised Sirivaddha to wish for the place of second disciple. Acting on this advice, Sirivaddha made elaborate preparations and entertained the Buddha and his monks for seven days. At the end of that time, he announced his wish to the Buddha, who declared that it would be fulfilled. From that time, the two friends, in that and subsequent births, engaged in good deeds.
Maudgalyayana was the most accomplished of all the Buddha's disciples in the various supernormal powers that could be developed through meditation. These abilities included being able to use mind-reading for such things as detecting lies from truths, transporting himself from his body into the various realms of existence, and speaking with ghosts and gods. He is traditionally attributed with the ability to do such things as walking through walls, walking on water, flying through the air, and moving with a speed comparable to the speed of light.
Varying accounts in the Pali Canon show Maudgalyayana speaking wrth the deceased in order to explain to them their horrific conditions and give them an understanding of their own suffering, so that they may be released from it or come to terms with it. Maudgalyayana was able to use his powers of mind-reading in order to give good and fitting advice to his students, so they could attain resuts quickly.
Maudgalyayana's demise came when he was traveling in Magadha. Some accounts put forth that religious cultists stoned him to death, others say it was robbers. The general consensus is that he was killed in brutal fashion. When asked why Maudgalyayana had not protected himself, and why a great arhat would suffer such a death, the Buddha said that because Maudgalyayana had contracted such karma in a previous life (he had murdered his parents in a previous life—one of the five cardinal sins of Buddhism), so he had no escape from reaping the consequences and had accepted the results. Further, the Buddha stated that even supernormal powers will be of little or no use to oneself in avoiding their karma, especially when it is so heavy.
Soon after the death of Sariputta, Mara, the embodiment of evil and the Lord of Death, claimed Moggallana's mortal frame, by entering his bowels. He could not make him possessed by entering his head, because he had access only to the lowest Chakra. Moggallana, however, told him calmly to get out and away as he had well recognized him. Mara was very surprised that he had been found out so soon, and in his delusion he thought that even the Buddha would not have recognized him so quickly. But Moggallana read his thoughts and ordered him again to get away. Mara now escaped through Moggallana's mouth antl stood at the hut's door post. Moggallana told him that he knew him not only from to-day but was aware of his karmic past and his descent. In that way, Moggallana manifested here three supernormal faculties: the Divine Eye, telepathy and recollection of past lives. It was only on this occasion, reported in Majjhima Nikaya No. 50, that Moggallana spoke of his recollection of his own distant past.
At that time, Maha-Moggallana lived alone in a forest but at Kalasila. After his encounter with Mara he knew that the end of his days was near. Having enjoyed the bliss of liberation, he now felt the body to be Just an obstruction and burden. Hence he had no desire to make use of his faculties and keep the body alive for the rest of the aeon. Yet, when he saw the brigands approaching, he Just absented himself by using his supernormal powers. The gangsters arrived at an empty hut, and though they searched everywhere, could not find him. They left disappointed, but returned on the following day. On six consecutive days Moggallana escaped from them in the same way. His motivation was not the protection of his own body, but saving the brigands from the fearsome karmic consequences of such a murderous deed, necessarily leading to rebirth in the hells. He wanted to spare them such a fate by giving them time to reconsider and abstain from their crime. But their greed for the promised money was so great that they persisted and returned even on the seventh day. Then their persistence was “rewarded,” for on that seventh day Moggallana suddenly lost the magic control over his body. A heinous deed committed in days long past (by causing the death of his own parents) had not yet been expiated, and the ripening of that old Kamma confronted him now, just as others are suddenly confronted by a grave illness. Moggallana realized that he was now unable to escape. The brigands entered, knocked him down, smashed all his limbs and left him lying in his blood. Being keen on quickly getting their reward and also somewhat ill as ease about their dastardly deed, the brigands left a once, without a further look. But Moggallana's great physical and mental strength was such that his vital energies had not yet succumbed. He regained consciousness and was able to drag himself to the Buddha. There, in the Master’s presence, at the holiest place of the world, at the source of the deepest peace, Moggallana breathed his last (Jat. 522E). The inner peace in which he dwelt since he attained to sainthood, never left him. It did not leave him even in the last seven days of his life, which had been so turbulent. But even the threat of doom was only external. This is the way of those who are finally “healed” and holy and are in control of the mind. Whatever Kamma of the past had been able to produce a result in his present life, nevertheless,it could affect only his body, but no longer “him”, because “he” no longer identified himself with anything existing only impermanently. This last episode of Moggallana's life, however, showed that the law of moral causality (Kamma) has even greater power than the supernormal feats of this master of magic. Only a Buddha can control the karmic consequences acting upon his body to such an extent that nothing might cause his premature death.
Before passing into Nibbana, he preached to the Buddha, at his request, and performed any miracles, returning to Kalasila to die. According to the Jataka account his cremation was performed with much honour, and the Buddha had the relics collected and a Thupa erected in Veluvana.
In Chinese Buddhism, the Mass that Maudgalyayana held to save his mother who had gone to the Hungry Ghost realm (one of the Six realms) is the foundation of Ullambana (Ghost Festival).
Great Disciples of the Buddha, Their Lives Their Works Their Legacy, Nyanaponika Thera and Hellmuth Hecker, edited by Bhikkhu Bodhi, Wisdom Publications, 2003, ISBN -86121-381-8, chapter 2
Life of Malta-Moggallana, Hellmuth Hecker Mafthima Nikaya No. 50
Burk/1.m A W Z, Ronald B Epstein, Buddhist Text Translation Society, 2003, ISBN 0-88139-353-3, pages 131 - 132
1.   Maudgalyayana – Wikipedia, the free encyclopedia
2. Parinibbana of Mahamoggallana – Wikipedia, the free encyclopedia
4. Relatives and Disciples of the Buddha – 02a
5. Mahá Moggallána Thera
6. Wh263–4 — Maha-Moggallana — Plain text