I'm going to lie to my friend so he doesn't get back with his ex.
Why would you want to lie to your friend like that?
I don't want to see him get hurt again and I want him to be happy.
I understand that you want to protect him. It's wrong to lie to your buddy, though, no matter what.
What if I did it for his own good?
Even though your motivations are to help them lying isn't the right way to do it. If you want to do the right thing you have to start by being honest.