Is it wrong that I broke my ex's leg?
Why did you break your ex's leg?
He kept harrassing me when I broke up with him.
You should apologize for breaking his leg, it's good to apologize. If you don't apologize he might hold a grudge.
I broke his leg when it's clear the relationship was broken down.
If you broke his leg in self defense, then it would be justified, but not just for harassment. You broke up and they need to realize you are no longer a part of their life, so make that clear to them without resorting to violence.