Exo 1:15-22 told the story of Hebrew midwives not obeying the Pharaoh's order to kill the male babies at birth and they were blessed by God. Most people thought that the Midwives lied to Pharaoh and thereby got into the difficulty of trying to explain that Biblical teaching of "the ends do not justify the means". This post tries to show that the Midwives did not lie at all and therefore such contradiction does not exist.
So we get back to the conclusion that "The ends does not and should never be used to justify the means." Looking at it another way, God cannot act out of His character to accomplish His work. God will surely not ask us to cheat our ways to achieve His purpose. Never use the Name of God to justify the evil and illegal methods that we use to achieve our own desires. That is one form of using the Name of God in vain. Illegal and evils ways will never be the will of God.