The principle of non-maleficence says that, in general, it is morally wrong to inflict harm on others. That sounds simple enough, but it turns out to be enormously complicated given the fact that assisting others often consists in the infliction of a lesser and/or improbable harm in order to avoid a major immanent harm. Let’s call these often unknown harms "side-effects." Hence, the best definition of non-maleficence is probably the following: "Do not cause other persons to die, suffer pain or disability, or deprive them of their most important interests, unless you have a good reason."
It is a timeless and universal Truth supported by both morality and legality that harm to others requires a good reason, or justification. There is a consensus among all human cultures at all times and all places that self-defense provides ample justification. In fact, we don’t have to be taught to defend ourselves. We do it quite naturally, thanks to that selfish gene. However, we can be taught to do it more efficiently. But self-defense as a justification for harm to others is contingent upon true beliefs, namely that there is (in fact) a threat present, and that killing, inflicting pain, or disabling the alleged aggressor is the most efficient way to escape that threat. Of course, we can easily make mistakes about the degree of threat, the necessity for inflicting varying degrees of harm, and even the identity of the purveyor of a threat.
When I was a child, I was awakened in the middle of the night by a strange man sleeping in the bed in the bed next to mine. I went downstairs and told my parents. Of course, they didn’t believe me because I had a longstanding reputation for sleepwalking and confusing reality with dream states. (Some say I still have that problem.) Anyway, my mother finally sent my father upstairs to prove to me that I was only dreaming. When he opened the door, there was a stranger asleep in my room. As it turned out this guy was no threat. He was just a drunk that had stumbled into the wrong house. (We didn’t lock doors back then.) My dad, being a big strong man, picked him up by the seat of his pants and his shirt collar, carried him down the stairs, and threw him out the front door. He really didn’t hurt him. As I look back, I’m sure that he could have inflicted serious harms on this guy. He could have beaten the guy to a pulp, or even killed him. He could have also called the police, which probably would have meant jail time for the guy and/or a hefty fine.
We never heard anything about this guy again. He probably lived somewhere in the neighborhood in a similar house. To this day, I’m not sure if dad did the right thing or not. He made a quick decision, decided that the intruder was no threat, decided that violence was unnecessary, and he decided not to get the police involved. But he could have been wrong. This could have been an armed serial killer that intended to kill all of us. He could have been a lifelong alcoholic with a history of spouse abuse that would have benefited from police intervention. The point here is that when we act out of self-defense we do not always have all the information that we need in order to make a perfectly rational, legal and/or moral decision.
Non-maleficence is often violated under the guise of preemptive strikes, which are notoriously problematic, not only at the individual level, but at the collective level. In general, I’m in favor of laws that permit individuals to carry concealed weapons, but I’m also well aware that not everyone is well-skilled at assessing threats. In short, pre-emptive strikes in the service of self-defense can often violate the principle of non-maleficence.
Finally, the principle of non-maleficence, invariably conflicts with other principles, especially: beneficence, utility, liberty, and justice. For now, we’ll move onto the principle of liberty, but keep in mind that morality often involves multiple principles that often conflict in the real world. If anyone tries to tell you that ethics is easy, don’t listen.