The Hindu tradition has the concept of the Purusharthas which outlines "four main goals of life". It holds that every human being has four proper goals that are necessary and sufficient for a fulfilling and happy life:
- Dharma – signifies behaviors that are considered to be in accord with rta, the order that makes life and universe possible, and includes duties, rights, laws, conduct, virtues and right way of living. Hindu dharma includes the religious duties, moral rights and duties of each individual, as well as behaviors that enable social order, right conduct, and those that are virtuous. Dharma, according to Van Buitenen, is that which all existing beings must accept and respect to sustain harmony and order in the world. It is, states Van Buitenen, the pursuit and execution of one's nature and true calling, thus playing one's role in cosmic concert.
- Artha – signifies the "means of life", activities and resources that enables one to be in a state one wants to be in. Artha incorporates wealth, career, activity to make a living, financial security and economic prosperity. The proper pursuit of artha is considered an important aim of human life in Hinduism.
- Kama – signifies desire, wish, passion, emotions, pleasure of the senses, the aesthetic enjoyment of life, affection, or love, with or without sexual connotations. Gavin Flood explains kāma as "love" without violating dharma (moral responsibility), artha (material prosperity) and one's journey towards moksha (spiritual liberation).
- Moksha – signifies emancipation, liberation or release. In some schools of Hinduism, moksha connotes freedom from saṃsāra, the cycle of death and rebirth, in other schools moksha connotes freedom, self-knowledge, self-realization and liberation in this life.
Each of these pursuits became a subject of study and led to prolific Sanskrit and some Prakrit languages literature in ancient India. Along with Dharmasastras, Arthasastras and Mokshasastras, the Kamasastras genre have been preserved in palm leaf manuscripts. The Kamasutra belongs to the Kamasastra genre of texts. Other examples of Hindu Sanskrit texts on sexuality and emotions include the Ratirahasya (called Kokashastra in some Indian scripts), the Anangaranga, the Nagarasarvasva, the Kandarpachudmani, and the Panchasayaka. The defining object of the Indian Kamasastra literature, according to Laura Desmond – an anthropologist and a professor of Religious Studies, is the "harmonious sensory experience" from a good relationship between "the self and the world", by discovering and enhancing sensory capabilities to "affect and be affected by the world". Vatsyayana predominantly discusses Kama along with its relationship with Dharma and Artha. He makes a passing mention of the fourth aim of life in some verses.
The earliest foundations of the kamasutra are found in the Vedic era literature of Hinduism. Vatsyayana acknowledges this heritage in verse 1.1.9 of the text where he names Shvetaketu Auddalaki as the "first human author of the kamasutra". Auddalaki is an early Upanishadic rishi (scholar-poet, sage), whose ideas are found in the Brihadaranyaka Upanishad such as in section 6.2, and the Chandogya Upanishad such as over the verses 5.3 through 5.10. These Hindu scriptures are variously dated between 900 BCE and 700 BCE, according to the Indologist and Sanskrit scholar Patrick Olivelle. Among with other ideas such as Atman (self, soul) and the ontological concept of Brahman, these early Upanishads discuss human life, activities and the nature of existence as a form of internalized worship, where sexuality and sex is mapped into a form of religious yajna ritual (sacrificial fire, Agni) and suffused in spiritual terms:
A fire – that is what a woman is, Gautama. Her firewood is the vulva, her smoke is the pubic hair, her flame is the vagina, when one penetrates her, that is her embers, and her sparks are the climax. In that very fire the gods offer semen, and from that offering springs a man.
– Brihadaranyaka Upanishad 6.2.13, ~700 BCE, Transl: Patrick Olivelle
According to the Indologist De, a view with which Doniger agrees, this is one of the many evidences that the kamasutra began in the religious literature of the Vedic era, ideas that were ultimately refined and distilled into a sutra-genre text by Vatsyayana. According to Doniger, this paradigm of celebrating pleasures, enjoyment and sexuality as a dharmic act began in the "earthy, vibrant text known as the Rigveda" of the Hindus. The Kamasutra and celebration of sex, eroticism and pleasure is an integral part of the religious milieu in Hinduism and quite prevalent in its temples.
Human relationships, sex and emotional fulfillment are a significant part of the post-Vedic Sanskrit literature such as the major Hindu epics: the Mahabharata and the Ramayana. The ancient Indian view has been, states Johann Meyer, that love and sex are a delightful necessity. Though she is reserved and selective, "a woman stands in very great need of surata (amorous or sexual pleasure)", and "the woman has a far stronger erotic disposition, her delight in the sexual act is greater than a man's".