We're less likely to remember the bad, unethical things we do, and hold onto memories of our great, charitable moments, a new study has found, suggesting that this 'selective memory' could be a subconscious attempt to kid ourselves that we're more moral than we actually are.

This could help to explain instances of repeated unethical behaviour, in everything from dodging your taxes through to cheating at cards. Scientists are calling it 'ethical amnesia', and they think it comes about because memories of our bad actions are so uncomfortable for us to recall. If you've ever swindled your employer out of dozens of packs of Post-It notes, do you really want to remember it?

Psychologists Maryam Kouchaki from Northwestern University and Francesca Gino from Harvard University ran nine separate studies covering more than 2,100 participants to test how selective their memories were. They found that ethical actions (like playing a game fairly) were remembered more clearly than their unethical counterparts (like cheating at the same game).

"We speculated… that people are limiting the retrieval of memories that threaten their moral self-concept, and that is the reason we see pervasive ordinary unethical behaviours,"  Kouchaki told Katherine Ellen Foley at Quartz.

The testing included getting people to write about past events (both ethical and unethical), setting up lab experiments where people had the opportunity to cheat (and then checking their recollection of it), and having people read stories of ethical and unethical behaviour. In each case, the researchers found evidence for ethical amnesia.

In one test, participants were asked to remember something after 30 minutes, and then also after four days – an experiment that suggested our memories of our own wrongdoing tend to become less clear as time goes on. Another test found evidence that ethical amnesia encourages persistent dishonesty over time.

"After they behave unethically, individuals' memories of their actions become more obfuscated over time because of the psychological distress and discomfort caused by such misdeeds," write Kouchaki and Gino in their paper. "This unethical amnesia and the alleviation of such dissonance over time are followed by more dishonesty subsequently in the future."

The researchers suggest that because morality is so fundamental to our human existence, there's a lot of psychological pressure to view ourselves – and be viewed by others – as people of good moral standing. At the same time, we can often be tempted to act unethically to gain personal advantage – and that gap causes ethical amnesia.

Or, to put it another way, maybe you're not quite the upstanding member of society as your memory would have you believe.

When study participants were asked to remember the ethical and unethical actions of other people, there was no difference between recollecting the two types of memories, which could be taken as further evidence that it's only our own morals that our mind plays tricks with.

The findings have been published in PNAS.