Penal Code Section 94
Act to which a person is compelled by threats
94. Except murder, offences included in Chapter VI punishable with death and offences included in Chapter VIA, nothing is an offence which is done by a person who is compelled to do it by threats, which, at the time of doing it, reasonably cause the apprehension that instant death to that person will otherwise be the consequence:
Provided that the person doing the act did not of his own accord, or from a reasonable apprehension of harm to himself short of instant death, place himself in the situation by which he became subject to such constraint.
Explanation 1—A person who, of his own accord, or by reason of a threat of being beaten, joins gang-robbers knowing their character, is not entitled to the benefit of this exception on the ground of his having been compelled by his associates to do anything that is an offence by law.
Explanation 2—A person seized by gang-robbers, and forced by threat of instant death to do a thing which is an offence by law—for example, a smith compelled to take his tools and to force the door of a house for the gang-robbers to enter and plunder it—is entitled to the benefit of this exception.
Please refer to the Attorney General's Chamber of Malaysia's website for the latest law.