Hey Kat...
It would depend on the military you're talking about. Historically, the US has always had a code of conduct, which preceded and which is not the law like the UCMJ (Uniform Code of Military Justice) is. The code of conduct is an ethical standard, a moral standard, that all members of the military are held to. Below is the current Code, but the first was written General George Washington:
Also, I was under the Airman's Creed (each branch has a Creed):
Specifically to ethical conduct,
here is a link to a document that, although not short, should be a good read for you to have a better idea about military ethics.
In the majority of instances, orders go through many layers of command before they are given to the ones that actually carry them out. The exception are the orders given directly during a firefight or battle situation. An order that betrays the law or conventions of war or ethical standards would be corrected or withdrawn (or belayed) before it ever could be executed. I have never seen or heard of that having to happen. However, I have had an instance where the first hand type order during a firefight was respectfully disregarded by me and my team. We had to explain ourselves after of course, but when we did, the person that issued the order saw the error as well and agreed with our decision. That's because the military is made up of honorable men and women, who although are not perfect and do make mistakes, are quick to correct even their own mistakes and accept ethical reasons as a rule to not be broken. A blatantly immoral order is not a legal order. Therefore it does not have to be followed. Although, as I said before, you have to be ready to explain yourself and your actions. And, you better make sure you're damned right, not just right. No. However, like I said, no one is perfect. In battle, emotions run high. When you're in combat, and the enemy is killing your friends, it's natural for you to want to get even, or take out your anger, hatred and fear on the enemy. In most instances, that's good, because it keeps you alert and motivated to live and survive while killing as many of the enemy as you can to achieve that (remember, killing the enemy is the goal - which some, as I've said previously in this thread, can be seen as immoral by some). However, once you have won, and the enemy has either surrendered or have been captured or have been killed, you have a moral duty to protect them if alive and treat them with respect whether they are alive or dead - sometimes that doesn't happen when individual soldiers, marines or airmen let their emotions overwhelm their ability to think and control their emotions. This is actually very, VERY, rare, even though the media makes a huge deal out of it like it's some normal event. Anyone that does not show respect for the enemy prisoner or the remains of the enemies dead always find themselves on the wrong side of a court martial, up to and including facing murder charges. That's right, a member of the military can be charged and convicted of murder, even during a battle where their job is to kill the enemy. We have a code, and murder is not part of it, not is peeing on the dead, or taking pictures of naked prisoners of war to degrade and embarrass them. There is a strong ethos of obedience to orders, but not blind obedience. It rarely happens, because the instances of immoral or illegal orders is very rare. And when I say rare, I mean almost non-existent. But, yes. As I said, I have, only once, but it was more because the person giving the order didn't understand the actual circumstances more than they were trying to get us to do something immoral and unethical. Nonetheless, I had to "stand-to" and "lock-heels" when I returned while I explained our actions. I almost got my butt handed to me, but once it was over, we all were fine, including the CO that issued the order.
I've told you above. That was the only time I even came close though. It's such a rare thing, that like I said, I've never even heard of it happening, other than the one time it happened to me. Others in here may be able to give you another example. I don now of one instance in A-Stan that I read about where an officer refused an order he thought was illegal, but he got in a lot of trouble over that, even though it had nothing to do with an order regarding the enemy. You have to be damned right, not just right. To not follow an order is insubordination at the very least, cowardice in the face of the enemy potentially, and desertion under fire at it's worst (which used to be punishable by firing squad).