In the Buddha's first discourse, he identifies craving (tanha) as the cause of suffering (dukkha). He then identifies three objects of craving: the craving for existence; the craving for non-existence and the craving for sense pleasures (kama). Kama is identified as one of five hindrances to the attainment of jhana according to the Buddha's teaching. Throughout the Sutta Pitaka the Buddha often compares sexual pleasure to arrows or darts. So in the Kama Sutta (4.1) from the Sutta Nipata the Buddha explains that craving sexual pleasure is a cause of suffering.
If one, longing for sensual pleasure, achieves it, yes, he's enraptured at heart. The mortal gets what he wants. But if for that person — longing, desiring — the pleasures diminish, he's shattered, as if shot with an arrow.
The Buddha then goes on to say:
So one, always mindful, should avoid sensual desires. Letting them go, he will cross over the flood like one who, having bailed out the boat, has reached the far shore.
The 'flood' refers to the deluge of human suffering. The 'far shore' is nibbana, a state in which there is no sensual desire.
The meaning of the Kama Sutta is that sensual desire, like any habitual sense pleasure, brings suffering. To lay people the Buddha advised that they should at least avoid sexual misconduct (See Theravada definition below). From the Buddha's full-time disciples, the ordained monks and nuns, strict celibacy (called brahmacarya) had always been required.
Former Vice President of the Buddhist Society and Chairman of the English Sangha Trust, Maurice Walshe, wrote an essay called 'Buddhism and Sex' in which he presented Buddha's essential teaching on human sexuality and its relationship to the goal (nibbana). The third of the five precepts states:
- Kamesu micchacara veramani sikkhapadam samadiyami,
The literal meaning of this statement is, "I undertake the course of training in refraining from wrong-doing in respect of sensuality." Walshe comments,
There is, in the Buddhist view, nothing uniquely wicked about sexual offenses or failings. Those inclined to develop a guilt-complex about their sex-life should realize that failure in this respect is neither more, nor, on the other hand, less serious than failure to live up to any other precept. In point of fact, the most difficult precept of all for nearly everybody to live up to is the fourth — to refrain from all forms of wrong speech (which often includes uncharitable comments on other people's real or alleged sexual failings!)...What precisely, then, does the Third Precept imply for the ordinary lay Buddhist? Firstly, in common with all the other precepts, it is a rule of training. It is not a "commandment" from God, the Buddha, or anyone else saying: "Thou shalt not..." There are no such commandments in Buddhism. It is an undertaking by you to yourself, to do your best to observe a certain type of restraint, because you understand that it is a good thing to do. This must be clearly understood. If you don't think it is a good thing to do, you should not undertake it. If you do think it is a good thing to do, but doubt your ability to keep it, you should do your best, and probably, you can get some help and instruction to make it easier. If you feel it is a good thing to attempt to tread the Buddhist path, you may undertake this and the other precepts, with sincerity, in this spirit.
The Buddha's teaching arises out of a wish for others to be free from dukkha. According to the doctrine he taught, freedom from suffering involves freedom from sexual desires and the training (Pali: sikkha) to get rid of the craving involves to a great extent abstaining from those desires.
Theravada uses the pali suttas and commentaries for references. Bhikkhu Nyanamoli has provided an English Translation of the Majjhima Nikaya 41, "He is given over to misconduct in sexual desires: he has intercourse with such (women) as are protected by the mother, father, (mother and father), brother, sister, relatives, as have a husband, as entail a penalty, and also with those that are garlanded in token of betrothal."
Celibacy and monasticism
Sex is seen as a serious monastic transgression. Within Theravada Buddhism there are four principal transgressions which entail expulsion from the monastic Sangha: sex, theft, murder, and falsely boasting of superhuman perfections. Sexual misconduct for monks and nuns includes masturbation. In the case of monasticism, abstaining completely from sex is seen as a necessity in order to reach enlightenment. The Buddha's criticism of a monk who broke his celibate vows—without having disrobed first—is as follows:
"'Worthless man, [sexual intercourse] is unseemly, out of line, unsuitable, and unworthy of a contemplative; improper and not to be done... Haven't I taught the Dhamma in many ways for the sake of dispassion and not for passion; for unfettering and not for fettering; for freedom from clinging and not for clinging? Yet here, while I have taught the Dhamma for dispassion, you set your heart on passion; while I have taught the Dhamma for unfettering, you set your heart on being fettered; while I have taught the Dhamma for freedom from clinging, you set your heart on clinging."
"'Worthless man, haven't I taught the Dhamma in many ways for the fading of passion, the sobering of intoxication, the subduing of thirst, the destruction of attachment, the severing of the round, the ending of craving, dispassion, cessation, unbinding? Haven't I in many ways advocated abandoning sensual pleasures, comprehending sensual perceptions, subduing sensual thirst, destroying sensual thoughts, calming sensual fevers? Worthless man, it would be better that your penis be stuck into the mouth of a poisonous snake than into a woman's vagina. It would be better that your penis be stuck into the mouth of a black viper than into a woman's vagina. It would be better that your penis be stuck into a pit of burning embers, blazing and glowing, than into a woman's vagina. Why is that? For that reason you would undergo death or death-like suffering, but you would not on that account, at the break-up of the body, after death, fall into deprivation, the bad destination, the abyss, hell..."
"'Worthless man, this neither inspires faith in the faithless nor increases the faithful. Rather, it inspires lack of faith in the faithless and wavering in some of the faithful.'" 
The most common formulation of Buddhist ethics are the Five Precepts and the Eightfold Path, which say that one should neither be attached to nor crave sensual pleasure. These precepts take the form of voluntary, personal undertakings, not divine mandate or instruction. The third of the Five Precepts is "To refrain from committing sexual misconduct.
Fornication, or sex outside of marriage, is seen as a violation of the 3rd precept from the Five Precepts in all schools of Buddhism. Celibacy or Brahmacariya rules pertain only to the Eight precepts or the 10 monastic precepts.
According to the Theravada traditions there are some statements attributed to Gautama Buddha on the nature of sexual misconduct. In Everyman's Ethics, a collection of four specific suttas compiled and translated by Narada Thera, it is said that adultery is one of four evils the wise will never praise. Within the Anguttara Nikaya on his teachings to Cunda the Silversmith this scope of misconduct is described: "...one has intercourse with those under the protection of father, mother, brother, sister, relatives or clan, or of their religious community; or with those promised to someone else, protected by law, and even with those betrothed with a garland"
According to some Tibetan authorities, the physical practice of sexual yoga is necessary at the highest level for the attainment of Buddhahood. The use of sexual yoga is highly regulated. It is only permitted after years of training. The physical practice of sexual yoga is and has historically been extremely rare. A great majority of Tibetans believe that the only proper practice of tantric texts is metaphorically, not physically, in rituals and during meditative visualizations. The dominant Gelug sect of Tibetan Buddhism holds that sexual yoga as an actual physical practice is the only way to attain Buddhahood in one lifetime. The founder of the sect Tsongkhapa did not, according to tradition, engage in this practice, but instead attained complete enlightenment at the moment of death, that being according to this school the nearest possible without sexual yoga. The school also taught that they are only appropriate for the most elite practitioners, who had directly realized emptiness and who had unusually strong compassion. The next largest school in Tibet, the Nyingma, holds that this is not necessary to achieve Buddhahood in one lifetime. The fourteenth Dalai Lama of the Gelug sect, holds that the practice should only be done as a visualization.
Among Buddhists there is a wide diversity of opinion about homosexuality. Buddhism teaches that sensual enjoyment and desire in general, and sexual pleasure in particular, are hindrances to enlightenment, and inferior to the kinds of pleasure (see, e.g. pīti, a Pāli word often translated as "rapture") that are integral to the practice of jhāna. The Buddha Gotama once stated, “Just as rain ruins an ill-thatched hut, passion destroys an ill-trained mind.” 
The third of the five precepts admonishes against "sexual misconduct"; however, "sexual misconduct" is a broad term, subject to interpretation according to followers' social norms. Early Buddhism appears to have been silent regarding homosexual relations.
According to the Pāli Canon and Āgama (the Early Buddhist scriptures), there is not any saying that same or opposite gender relations have anything to do with sexual misconduct, and some Theravada monks express that same-gender relations do not violate the rule to avoid sexual misconduct, which means not having sex with someone underage (thus protected by their parents or guardians), someone betrothed or married and who have taken vows of religious celibacy.
Some later traditions feature restrictions on non-vagina sex, though its situations seem involving coerced sex.
Conservative Buddhist leaders like Chan master Hsuan Hua have spoken against the act of homosexuality. Some Tibet Buddhist leaders like the 14th Dalai Lama spoke about the restrictions of how to use your sex organ to insert other's body parts based on Je Tsongkhapa's work.
The situation is different for monastics. For them, the Vinaya (code of monastic discipline) bans all sexual activity, but does so in purely physiological terms, making no moral distinctions among the many possible forms of intercourse.
- Kama Sutta, Sutta Nipata 4.1
- "Buddhism and Sex". Accesstoinsight.org. 2012-12-01. Retrieved 2013-09-14.
- Saleyyaka Sutta: The Brahmans of Sala (MN 41)
- Saddhatissa, Hammalawa (December 1987). Buddhist Ethics: The Path to Nirvana. Wisdom Pubns; New Ed edition. p. 88. ISBN 0-86171-053-3.
- Lopez, Donald S. Critical Terms for the Study of Buddhism. Chicago: The University of Chicago Press. 2005
- Olson, Carl. The Different Paths of Buddhism: A Narrative-Historical Introduction. New Jersey: Rutgers University Press. 2005
- "Introduction". The Buddhist Monastic Code I: The Patimokkha Training Rules Translated and Explained. Access to Insight. Archived from the original on 2012-08-28. Retrieved 18 August 2012.
- Higgins, Winton. "Buddhist Sexual Ethics". BuddhaNet Magazine. Retrieved 2007-01-15.
- Bhikkhu, Thanissaro (2005). "The Five Precepts: pañca-sila". Access to Insight. Retrieved September 20, 2019.
- Thera, Narada. "Everyman's Ethics Four Discourses of the Buddha" (PDF). Buddhist Publication Society. Archived from the original (PDF) on 2016-03-03. Retrieved 2010-04-16.
- Thanissaro Bhikkhu. "Cunda Kammaraputta Sutta". Access to Insight. Retrieved 2010-04-16.
- Routledge Encyclopedia of Buddhism, page 781
- An Introduction to Buddhist Ethics: Foundations, Values and Issues - Peter Harvey - Google Boeken. Books.google.com. 2000-06-22. Retrieved 2013-09-14.
- The Story of Tibet: Conversations with the Dalai Lama - Thomas Laird - Google Boeken. Books.google.com. Retrieved 2013-09-14.
- Routledge Encyclopedia of Buddhism, page 781; the briefer statement in this article by Powers should be understood in the light of his fuller statement in his book Introduction to Tibetan Buddhism, Snow Lion, 1995, pages 252f
- Stevens, John (cop. 1990). Lust for enlightenment : Buddhism and sex. Shambhala Publ. ISBN 087773416X. OCLC 716757478. Check date values in:
- Sangharakshita (2010). The Ten Pillars of Buddhism. Windhorse Publications. pp. 161–164.
- James William Coleman, The New Buddhism: The Western Transformation of an Ancient Tradition. Oxford University Press 2002, page 146.
- "Cunda Kammaraputta Sutta" [To Cunda the Silversmith]. Translated from the Pali by Thanissaro Bhikkhu. Access to Insight. 1997. AN 10.176. Retrieved 2011-03-14.
Abandoning sensual misconduct, he abstains from sensual misconduct. He does not get sexually involved with those who are protected by their mothers, their fathers, their brothers, their sisters, their relatives, or their Dhamma; those with husbands, those who entail punishments, or even those crowned with flowers by another manCS1 maint: others (link)
- Ajahn Punnadhammo. "Same Sex Marriage".
The lay man is told to abstain from sex with "unsuitable partners" defined as girls under age, women betrothed or married and women who have taken vows of religious celibacy. This is clear, sound advice and seems to suggest that sexual misconduct is that which would disrupt existing family or love relationships. This is consonant with the general Buddhist principle that that which causes suffering for oneself or others is unethical behaviour. ("Unskillful behaviour" would be closer to the original.) There is no good reason to assume that homosexual relations which do not violate this principle should be treated differently.
- Somdet Phra Buddhaghosacariya (1993). Uposatha Sila The Eight-Precept Observance.There are four factors of the third precept (kamesu micchacara)
- agamaniya vatthu — that which should not be visited (the 20 groups of women).
- asmim sevana-cittam — the intention to have intercourse with anyone included in the above-mentioned groups.
- sevanap-payogo — the effort at sexual intercourse.
- maggena maggappatipatti — sexual contact through that adhivasanam effort.
- Bhikkhu Bodhi (1981). Going for Refuge & Taking the Precepts (The Five Precepts). Buddhist Publication Society.
- Ajahn Punnadhammo. "Same Sex Marriage".
- harvey, peter (2000). An Introduction to Buddhist Ethics. Cambridge University Press. pp. 421-. ISBN 9780511800801.
- Prebish, Charles: The Faces of Buddhism in America, page 255. University of California Press, 1998.
- "Even with your wife, using one's mouth or the other hole is sexual misconduct. Using one's hand, that is sexual misconduct". (Dalai Lama, at a meeting with lesbian and gay Buddhists, June 11, 1997). Reported widely, including in: Dalai Lama Speaks on Gay Sex – He says it's wrong for Buddhists but not for society. By Don Lattin, Chronicle Religion Writer, Tuesday, June 11, 1997, San Francisco Chronicle. Text online
- Dalai Lama urges "respect, compassion, and full human rights for all", including gays, by Dennis Conkin, Bay Area Reporter, June 19, 1997. Text online
- George E. Haggerty, Gay histories and cultures: an encyclopedia. Taylor and Francis 2000, pages 146–147.
|Wikimedia Commons has media related to Buddhism and sexuality.|
- Buddhist Sexual Ethics: Main Issues – Alexander Berzin
- Buddhist & Western Views on Sex – Alexander Berzin
- Thinking through Texts: Toward a Critical Buddhist Theology of Sexuality by José Ignacio Cabezón, Public Lecture, Naropa University, September 23, 2008