The origin comes from the Bible where the King James Version of Jeremiah 13:23 talks about evil people doing good when the Leopard can change his spots. The exact quote has been provided above from the Holy book. The reference is towards the fact that those who are evil will not do good and vice versa. Due to its biblical origin, this phrase is more affiliated with good and evil in literary context.