Jaime was against killing Tyrion throughout his trial and did everything he could to save him. He tried to reason with Cersei, but she was so consumed by her hatred for Tyrion and the grief of losing her son that she refused to listen.
Jaime managed to secure a promise from Tywin that if Tyrion was found guilty of Joffrey's murder then he would be sentenced to serve in the Night's Watch. In return Jaime agreed to leave the Kingsguard and become Tywin's heir to Casterly Rock (members of the Kingsguard made similar vows as the men of the Night's Watch: couldn't hold titles or inherit lands, etc), which is what Tywin wanted all along.
If all went well Tyrion would live and be safely away from his scheming family members at the Wall and Tywin would get the heir that he wanted. However, Shae's testimony against Tyrion sent him over the edge and he demanded a trial by combat, essentially throwing Tywin and Jaime's original agreement out the window. After Tyrion lost his trial by combat, Jaime was forced to set him free to save him.
So there really isn't a double standard at all. Jaime knew that Tyrion was innocent and that killing him was wrong, and did everything he could to save him. But he didn't think that Tyrion would kill their father out of revenge.