MN 19
This is what I heard. One time the Buddha was staying near Savatthi in Jeta’s Grove, Anathapindika’s monastery.
He said this to the seekers:
"Seekers, one time while I was searching for awakening, I thought: 'Why don't I practice dividing my thoughts into two classes?' So I placed sensual, malicious and harmful thoughts in one class and put thoughts of letting go, good will and harmlessness in another.
Then, if a sensual thought arose while I was practicing carefully, intensely and determined, I would understand it like this:
'A sensual though has arisen. It leads to harm for myself and others. It blocks wisdom. It is annoying and leads away from vanishing.'
When I reflected like this, it went away.
And so I gave up and eliminated any sensual thoughts.
And by using the same reflection, I eliminated malicious thoughts and harmful thoughts.
Seekers, the heartmind leans towards whatever one thinks about often. If one often thinks about sensuality, then one has given up thoughts of letting go. And so the heartmind leans towards sensuality.
Likewise, if one often thinks malicious and harmful thoughts, then one has given up thoughts of good will and harmlessness. And so the heartmind leans towards malice and harming.
Imagine it's the end of the rainy season and the crops are ripe. A cowherd knows he could be fined, imprisoned or killed if he lets his cattle eat someone else's crops. And so he prevents them from doing it with his staff.
Just like that, I saw that the drawbacks of unwholesome qualities are degradation and corruption and I saw that the benefit of wholesome qualities is the cleansing power letting go.
Then, if a thought of letting go arose while I was practicing carefully, intensely and determined, I would understand them like this:
'A thought of letting go has arisen. It doesn't lead to harm for myself and others. It enhances wisdom. It leads to vanishing and frees one from distress'
There is no danger in reflecting on this thought, even all day and all night. Still, too much thinking and reflecting might tire the body, which would stress the heartmind. A stressed heartmind lacks lucid unification. To prevent stress, I steadied, settled, focused and led my heartmind to lucid unification.
And so I reflected and trained myself in the same way whenever thoughts of good will and harmlessness arose in me.
The heartmind leans towards whatever one thinks about often. If one often thinks about letting go, then one has given up thoughts of sensuality. And so the heartmind leans towards letting go.
Likewise, if one often thinks thoughts of good will and harmlessness then one has given up thoughts of malice and harming. And so the heartmind leans towards good will and harmlessness.
Imagine it's the end of summer and the crops have been brought to a village. The cowherd only needs to sit under a tree or in the open and watch his cattle. Just like this, all I did was to stay mindful of those good qualities.
With tireless energy, lucid mindfulness and a calm body, my heartmind became unified.
Well secluded from sensual pleasures and unwholesome qualities, I entered and remained in the first meditation, which has these qualities: bliss and happiness born of solitude, thinking and evaluating.
Then, with the stilling of thinking and evaluating, I entered into the second meditation which consists of: bliss and happiness born of lucid unification, inner clarity, confidence and oneness.
Then, by letting go of bliss, I entered into the third meditation, where I was serene, mindful and aware. The noble ones state that this is a peaceful and happy state.
Then I gave up all pleasure and pain, happiness and sadness, and so I entered into the fourth meditation. Here there is just pure mindful serenity.
When my heartmind had become immersed in lucid unification and was purified, flawless, without corruptions, pliable, workable, and steady, I used it to remember my past lives.
I remembered hundreds of thousands of rebirths, and many eons of universal expansion and contraction. I remembered the details from many previous lives, like different names, families, foods, different forms of sadness and happiness, and different deaths.
This was the first knowledge I achieved during the first part of the night. Ignorance and darkness were destroyed. Light arose in me as I meditated with carefulness, intensity and determination.
And so, with my heartmind immersed in lucid unification, purified and so on, I used it to gain knowledge of the birth and death of sentient beings. I saw beings dying and being born. I saw inferior and superior beings, beautiful and ugly ones, I saw beings in good and bad places. I understood how beings are reborn according to their actions and views.
This was the second knowledge I achieved in the middle of the night. Ignorance and darkness were destroyed. Light continued to grow in me as I meditated with carefulness, intensity and determination.
And so, with my heartmind immersed in lucid unification, I used it to gain knowledge of the poisons. I truly knew suffering, the origin of suffering, the ending of suffering and the practice that leads to its end. I truly knew the poisons, their origin, their ending and the practice that leads to their end.
Knowing and seeing like this, I was freed from the poisons of sensuality, desire for existence and ignorance. When my mind was freed, I knew it. I also knew that birth had ended. My spiritual journey was over. I had done what I had to do and there was no going back.
This was the third knowledge I achieved. Ignorance and darkness were destroyed and light grew in me as I meditated with carefulness, intensity and determination.
Imagine that there was a large herd of deer living near some wild forest marshes. Then, someone who wants to harm and trap them closes off the safe path and opens a wrong path. They even plant male and female decoys, and so, the herd of deer falls into ruin.
But then someone who wants to help and free the deer comes and opens up the safe and happy path, closes the wrong path and removes the decoys. In due time, the herd of deer grows and thrives.
Seekers, I came up with this simile with the following meaning:
The marshes signify sensual pleasure.
The herd of deer signifies sentient beings.
The person who wants to harm them signifies Mara, the wicked.
The wrong path signifies the wrong eightfold path, wrong view and so on.
The male decoy signifies desire with relishing and the female decoy signifies ignorance.
The person who helps the deer signifies the fully awakened Buddha.
The safe path signifies the noble eightfold path.
Seekers, I have opened the safe path to happiness, closed the wrong path and have removed the decoys.
I have done what's best for my disciples because I care for you.
Seekers, here are the roots of trees, there are empty huts. Practice meditation! Don't be careless! Don't regret it later! This is my teaching to you.
That is what the Buddha said and the seekers were happy.