The Buddha explains how thoughts of sensuality, ill-will, and harming arise from a cause and how to abandon them.
Sanidāna sutta - From A Cause
At Sāvatthi.
"Thought of sensuality arises from a cause, bhikkhus, it is not without a cause; thought of ill-will arises from a cause, it is not without a cause; thought of harming arises from a cause, it is not without a cause.
And how, bhikkhus, does a thought of sensuality arise from a cause, and not without a cause? How does a thought of ill-will arise from a cause, and not without a cause? How does a thought of harming arise from a cause, and not without a cause? Dependent on the domain of sensual pleasures, bhikkhus, arises the perception of sensuality; dependent on the perception of sensuality arises the intention of sensuality; dependent on the intention of sensuality arises sensual desire; dependent on sensual desire arises sensual fever; dependent on sensual fever arises search for sensual pleasures. When seeking sensual pleasures, bhikkhus, the uninstructed ordinary person practices improperly in three ways: by body, by speech, and by mind.
Dependent on the domain of ill-will, bhikkhus, arises the perception of ill-will; dependent on the perception of ill-will arises the intention of ill-will; dependent on the intention of ill-will arises the desire of ill-will; dependent on the desire of ill-will arises the fever of ill-will; dependent on the fever of ill-will arises the search of ill-will. When engaged in a search of ill-will, bhikkhus, the uninstructed ordinary person practices improperly in three ways: by body, by speech, and by mind.
Dependent on the domain of harm, bhikkhus, arises the perception of harm; dependent on the perception of harm arises the intention of harm; dependent on the intention of harm arises the desire of harm; dependent on the desire of harm arises the fever of harm; dependent on the fever of harm arises the search of harm. When engaged in a search of harm, bhikkhus, the uninstructed ordinary person practices improperly in three ways: by body, by speech, and by mind.
Just as, bhikkhus, a person would throw a burning torch into a dry grass pile, and if they did not quickly extinguish it with their hands and feet, in this way, bhikkhus, those living beings dependent on grass and wood would face misfortune and disaster.
In the same way, bhikkhus, whoever, whether an ascetic or a Brahmin, does not quickly abandon, dispel, eliminate, and cause to cease an arisen unwholesome perception, dwells in suffering in this very life with distress, misery, and fever; and after the breakup of the body, after death, a bad destination is expected.
Thought of relinquishment arises from a cause, bhikkhus, it is not without a cause; thought of non-ill-will arises from a cause, it is not without a cause; thought of non-harm arises from a cause, is not without a cause.
And how, bhikkhus, does a thought of relinquishment arise with a cause, not without a cause? How does a thought of non-ill-will arise with a cause, not without a cause? How does a thought of non-harming arise with a cause, not without a cause? Dependent on the domain of relinquishment, bhikkhus, arises the perception of relinquishment; dependent on the perception of relinquishment arises the intention of relinquishment; dependent on the intention of relinquishment arises the desire of relinquishment; dependent on the desire of relinquishment arises the fever of relinquishment; dependent on the fever of relinquishment arises the search of relinquishment. When engaged in a search of relinquishment, bhikkhus, the instructed disciple of the noble ones practices properly in three ways: by body, by speech, and by mind.
Dependent on the domain of non-ill-will, bhikkhus, arises the perception of non-ill-will; dependent on the perception of non-ill-will arises the intention of non-ill-will; dependent on the intention of non-ill-will arises the desire of non-ill-will; dependent on the desire of non-ill-will arises the fever of non-ill-will; dependent on the fever of non-ill-will arises the search of non-ill-will. When engaged in a search of non-ill-will, bhikkhus, the instructed disciple of the noble ones practices properly in three ways: by body, by speech, and by mind.
Dependent on the domain of non-harming, bhikkhus, arises the perception of non-harming; dependent on the perception of non-harming arises the intention of non-harming; dependent on the intention of non-harming arises the desire of non-harming; dependent on the desire of non-harming arises the fever of non-harming; dependent on the fever of non-harming arises the search of non-harming. When engaged in a search of non-harming, bhikkhus, the instructed disciple of the noble ones practices properly in three ways: by body, by speech, and by mind.
Just as, bhikkhus, a person would throw a burning torch into a dry grass pile, and quickly extinguish it with their hands and feet. In this way, bhikkhus, those living beings dependent on grass and wood would not face misfortune and disaster.
In the same way, bhikkhus, whoever, whether an ascetic or a Brahmin, quickly abandons, dispels, eliminates, and causes to cease an arisen unwholesome perception, dwells happily in this very life without distress, without misery, without fever; and after the breakup of the body, after death, a good destination is expected."