Commitment or obligation to someone or something or to perform an action on the behalf of
A duty (from "due" meaning "that which is owing"; Old French: deu, did, past participle of devoir; Latin: debere, debitum, whence "debt") is a commitment or expectation to perform some action in general or if certain circumstances arise. A duty may arise from a system of ethics or morality, especially in an honor culture. Many duties are created by law, sometimes including a codified punishment or liability for non-performance. Performing one's duty may require some sacrifice of self-interest.
https://en.wikipedia.org/wiki/Duty