Past historical events and experimental research have shown complying with the orders from an authority has a strong impact on people's behaviour. However, the mechanisms underlying how obeying orders influences moral behaviours remain largely unknown. Here, we test the hypothesis that when male and female humans inflict a painful stimulation to another individual, their empathic response is reduced when this action complied with the order of an experimenter (coerced condition) in comparison with being free to decide to inflict that pain (free condition). We observed that even if participants knew that the shock intensity delivered to the 'victim' was exactly the same during coerced and free conditions, they rated the shocks as less painful in the coerced condition. MRI results further indicated that obeying orders reduced activity associated with witnessing the shocks to the victim in the ACC, insula/IFG, TPJ, MTG and dorsal striatum (including the caudate and the putamen) as well as neural signatures of vicarious pain in comparison with being free to decide. We also observed that participants felt less responsible and showed reduced activity in a multivariate neural guilt signature in the coerced than in the free condition, suggesting that this reduction of neural response associated with empathy could be linked to a reduction of felt responsibility and guilt. These results highlight that obeying orders has a measurable influence on how people perceive and process others' pain. This may help explain how people's willingness to perform moral transgressions is altered in coerced situations.