Dharma is defined as a duty in Hinduism. Your Dharma is a synthesis of your social circumstances, the behaviour that is expected of you, and your true-life purpose. Adharma, on the other hand, is defined as anything that is against nature and is immoral, unethical, incorrect, or unlawful. While Dharma conserves society and life in general and is done with the altruistic intention of benefiting others and oneself; adharma usually causes damage, pain, and suffering and is motivated by selfishness. However, dharma and adharma, good and evil, righteousness and unrighteousness; belong to the Jiva. Thus, we can say that dharma and adharma are dual orientations of the egoic self.
Duality of this illusionary world
The world entails the illusory duality of right and wrong, good and bad, more and less, etc. But this duality does not change the truth. One can kill a person with a knife and other may use it to cut vegetables. But the knife is not the cause of either of these. The sun sheds its light upon the wicked as well as on the virtuous and it is unaffected by both. In fact, the duality is what takes you towards the ultimate Truth that is Shiva. Lord Shiva is beyond the illusion of duality. He is beyond vidya and avidya, knowledge and ignorance. He is beyond maya. He is truth that shines forth from the duality. He is the awakening into your true nature of infinite awareness, peace, love and absolute joy beyond the duality. We can see that in the 8 limbs of yoga as established by Patanjali 2,000 years ago which evolves from the dualities of the mind and body to a state of samadhi or total dissolution into one non-dual connection with the divine.
Then how can one explain misery, sin, losses and unhappiness experienced in this world and also the contentment, good deeds, profit and happiness? The answer is that these ones apply only to the jiva as these need a subject and an object. Bad deeds give outcome as per their nature and good deeds give outcome as per their nature, too. Shiva is beyond the subject and object and is the consciousness or presence. We can say that these dualities help to throw light that takes us towards Shiva realisation.
Lord Shiva: Non-Duality Beyond the Ego
Shiva is our actual essence beyond all forms of dualities. This is because Shiva is the summum bonum of all creation and permeates the whole cosmos. This principle, known as Shiva Tattva, is the essence of life and may be found deep inside every living entity as the source of all serenity, infinity, beauty, and non-duality. As a result, Lord Shiva exists in every cell of every being while also transcending every living and non-living form, as He is universal.