The Bhagavad Gita opens with Arjuna laying down his bow on the battlefield of Kurukshetra, refusing to fight a war that will kill his own teachers, cousins and friends on the opposing side. Krishna's answer, across the poem's eighteen chapters, is not a suspension of the ethical question but an argument about where the answer lies. Arjuna is a warrior, a kshatriya, with a specific svadharma, an own duty, to fight when a just cause requires it. Abandoning that duty out of personal grief, however understandable, is presented as a moral failure rather than a mercy, since it substitutes private feeling for one's assigned role.
The Gita states the principle directly at chapter 3, verse 35: better one's own duty done imperfectly than another's done well, for death in one's own duty is better, another's duty brings danger. Chapter 18 restates it after a survey of the duties proper to each of the four traditional social classes. Alongside this role specific svadharma, the Dharmasastra literature, most influentially the Manusmriti compiled across roughly the last two centuries BCE and the first two CE, sets out sadharana dharma, duties binding everyone regardless of role: truthfulness, non injury, self control and generosity.
This framework has drawn sustained modern criticism where it ties duty to birth. Reformers including Gandhi reworked svadharma as chosen vocation and inner disposition rather than inherited social position, while other modern readers have rejected the birth based scheme outright as a justification for caste hierarchy. The debate is not a modern import onto an otherwise settled text: the Gita's own insistence that duty outranks personal preference is what later readers have needed to either defend or dismantle.