A few years ago I found myself teaching a university class on evil. It was for third-year criminology students to help them contextualise theory and research within controversial current topics. It was a huge success. The debates were heated and interesting. I could see people’s views change within the course of a single lecture.

Over the past 13 years, as a student, lecturer and researcher, I’ve enjoyed discussing the science of evil with anyone willing to listen. What I relish most is destroying the lazy clichés of good and evil, and replacing them with nuance and scientific insight. We need a more informed way of discussing behaviour that at first we cannot, or should not, begin to understand.

Without understanding, we risk dehumanising others, writing off human beings simply because we don’t comprehend them. We must try to understand that which we have labelled evil. We tend to think evil is something that other people are. We think of ourselves as “good people”, and even when we do morally reprehensible things, we understand the context of our decisions. With others, however, it is far easier to write them off. If their actions deviate substantially from what we consider acceptable, we may label them evil.

We need to be careful with this. Calling someone evil is often akin to saying they cannot change, and perhaps aren’t even a human at all. However, when you actually go monster-hunting, and you look deeply at the people behind horrific behaviour, you may be surprised.

As a child I used to love the Scooby-Doo cartoons. Arriving in their “Mystery Machine”, the gang would have to find a monster who was terrorising a neighbourhood. They would run around looking for clues and at the end unmask the villain. It was always a normal person in a costume. There were no monsters. Like the Scooby crew, we may find ourselves hunting for an easy fix, one word for people who do bad things. But if we take a good look, the word evil is insufficient – there are no simple explanations for why humans do bad things: instead there are many, and they are all marvellously nuanced.

It’s easy to label people as evil, but everyone is capable of great harm

Although there may be differences between those who do “bad” things and those who don’t, these are not fundamental. Acknowledging the similarities between all of us can be far more useful than aggressively highlighting the differences. Research from neuroscience and behavioural economics, psychology and criminology, history and politics all point to the same finding: everyone is capable of great harm. However, given its universal nature, maybe our capacity for deviance and harm can somehow be good for us.

Evil is typically referred to when there is deviance from social norms: formal deviance is the violation of laws, like theft, murder, and assault, while informal deviance involves violations of social norms, like lying. Evil behaviour is typically thought to embrace one or both forms. However, deviance can also describe a behaviour that simply diverges from the norm.

Perhaps this is where we can find the good side of our bad side. Deviating from the norm can make us villains, but it can also make us heroes. A child deviates from social pressures when they stand up for another child being bullied in school. A soldier deviates when they choose not to follow orders to kill an innocent civilian. An employee in a big tech company deviates when they blow the whistle. In authoritarian regimes, resistance or protest is deviant. In this sense, creativity is also a deviation. Here, too, things are complex. Thinking creatively has given us modern medicine, technology and modern political structures, but it has also given us cyanide, nuclear weapons and bots that threaten democracy. Great benefit and great harm can come from the same human tendency.

In a research paper, Evil Genius, published in 2014, the behavioural scientists Francesca Gino and Scott Wiltermuth wanted to examine whether people who behave unethically in one task are more creative than others on a subsequent task, even after controlling for differences in baseline creative skills. The unethical behaviour they chose was dishonesty.

Over five experiments researchers gave participants tasks in which they could cheat. In the first study, they were given matrixes and had to find two numbers that added up to 10. Participants were asked to self-report how well they did at the end of the study: 59% cheated by saying that they solved more matrixes than they actually had. In another experiment, using maths and logic questions, participants were told to press a space bar to stop the answer from popping up before they solved the question: 96% cheated by not pressing the space bar.

After each task, the researchers measured participants’ performance on the Remote Associates Test. This shows participants three words at a time that appear to be unrelated, and the person has to think of a fourth word that is associated with all of them. For example you might get “Fox, Man, Peep”, or “Dust, Cereal, Fish”. In order to find the linking words (“Hole” for the first, “Bowl” for the second) you need to be creative. The more you get right, the more creative you are thought to be because you have come up with uncommon associations.

Find logic games and cheat, play Scrabble with a dictionary

For every one of the five studies, they found the same thing – participants who cheated in the first task did better on the creativity task. Why? Like other forms of unethical behaviour, lying means breaking rules. It involves being deviant, going against the social principle that people should tell the truth. Similarly, being creative involves “thinking outside the box”, deviating from expectations. They involve similar thought patterns, so stimulating one stimulates the other.

Can we learn from this? Perhaps. To be more creative, we could try lying in a controlled environment. Find online logic games and cheat at them, play Scrabble with a dictionary, or write a story about something that is untrue? Such tasks can get our brains thinking flexibly, beyond our normal comfort zone. This is not a call to become a pathological liar, but a controlled liar.

Breaking the rules to encourage creativity is echoed by the slogan “move fast and break things”, often associated with an entrepreneurial climate notorious for creativity and progress – Silicon Valley. New generation workspaces often intentionally create physical and social structures that are abnormal. This controlled “deviance” can stimulate new connections, brave new ideas.

Of course, this can go too far. Some tech companies have certainly deviated from, or broken the rules, in ways that have negative impacts beyond Silicon Valley. It makes the other famous slogan “Don’t be evil” seem almost sarcastic. Perhaps rapid creativity cannot exist without occasional wrongdoing, or perhaps we need to make sure that when ideas are turned into action, we re-engage our less deviant thinking.

In addition to benefits for creativity, deviance can be a good thing in other ways. Even Philip Zimbardo, the author of the Stanford prison experiment, who showed how easily we can be led to behave badly, believes that the future of deviance research may lie more in understanding extreme pro-social behaviour, such as heroism. Like evil, we often view heroism as only a possibility for outliers – for people who are abnormal. But Zimbardo asks: “What if the capability to act heroically is also fundamentally ordinary and available to all of us?” Some say we should never meet our heroes, lest they disappoint us when we find out how normal they are. But this should be liberating, not disappointing. We are all capable of behaving like outliers. It’s time for us to demystify deviance, and realise its potential for good as well as harm.

How to be more creative

• Free yourself from the concept of evil. All people, including you, are capable of great harm. Deviate from what the rest of the world is saying, and avoid dehumanising others.

• Realise that to be creative is to be deviant. Unfettered thinking is important, but reapply your morality when you turn your ideas into action.

• Harness your inner hero. Internalising the realisation that you too can be a hero makes it more likely that you will use your deviant power to help others.

Making Evil by Julia Shaw (Canongate, £14.99) is available for £13.19 from guardianbookshop.com