It was used in this context. I was "duty-bound" to obey all lawful orders.
In fact, I took the following oath. It's the oath officers in every branch of the United States military and civilians elected or appointed take as well. Click here. It says:
“I, _____ do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign and domestic, that I will bear true faith and allegiance to the same; that I take this obligation freely, without any mental reservation or purpose of evasion; and that I will well and faithfully discharge the duties of the office upon which I am about to enter; So help me God.”
Now, the enlisted soldier or sailor takes a similar oath which says "they will obey the order of":
“I, _____, do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign and domestic; that I will bear true faith and allegiance to the same; and that I will obey the orders of the President of the United States and the orders of the officers appointed over me, according to regulations and the Uniform Code of Military Justice. So help me God.”
That was the context. We were duty bound to obey lawful orders. But the question is, what does duty require when unlawful orders are given?