"Be peaceful" should be the easiest part to grasp. Don't initiate violence, and don't threaten to initiate it.
"Be courteous" is hard for some upper class rebels to understand, because they think civility is a bourgeois notion that should be discarded. They fail to see that every community has rules of behavior. A common expression of that among working class southerners is "Didn't your mama teach you no manners?"
“Obey the law” is hard for many rebels to understand. It doesn't mean submit to authority. It's a tactic for protest—disobeying the law gives the authorities an excuse to silence you. Because Malcolm, after he left the Nation of Islam, respected Martin Luther King’s use of civil disobedience, I suspect Malcolm would say this part of his code, like any code, may be broken if you're sure you'll be more effective by breaking it.
"Respect everyone" is the advice that St. Peter also gives. It is the definition of civility, the tool of diplomats. It has nothing to do with good manners—good manners call for you to avoid unpleasantness. Civility lets you confront any unpleasantness.
"If someone puts his hand on you, send him to the cemetery" is the hardest part to grasp for pacifists and war lovers. The “if” is essential. Has no one laid hands on you? Stay peaceful, courteous, and respectful. Online, no one can put a hand on you. In civil meetings, no one will put a hand on you. We know Malcolm meant "puts his hand on you" literally because he was civil to everyone, including George Rockwell, founder of the American Nazi Party.
Further, if someone puts a hand on you, you are not obliged to respond with violence and you may not use more violence then necessary. Just as "an eye for an eye" says you may not take two eyes for one, "if someone puts his hand on you, send him to the cemetery" says you may only choose to use lethal force while you're defending yourself. As soon as your opponents are incapable of laying hands on you or have stopped laying hands on you, the first half of the code applies: respect them.
Possibly relevant: A little about America's idea of cowboys and traditional male values. Cowboy codes of the early 20th century have a lot in common with Malcolm's code.