He is still emotionally attached to his ex.
Telling you that he had fallen out of love with you and was only going through the motions may suggest that he only got into a relationship with you in the first place as a rebound.
This would mean that he never actually got over the breakup with his ex and only used his relationship with you as a means to cover up his emotional baggage.
If he has been repeatedly cheating on you with his ex during the course of your 9 year relationship with him, he will continue to do so even if the both of you were to seemingly work things out and get back together.
It would be best to end your relationship with him. Staying on would only lead to constant betrayal and emotional turmoil.