Time to pack and go i.e leave the relationship. It shows he doesn't respect you as his girlfriend. The fact he says he wants freedom indicates you are obstructing him from talking to other girls. He wants to flirt with girls however he wants while still in a relationship with you.
Once a person commits in a relationship, there are some things he needs to stop doing. He is no longer single with no strings attached. But, the fact is that he considers you as a jail whereby he can't breathe or move.
If your boyfriend lacks respect for who you are in his life, then why bother to continue in the relationship with him? Let him know you no longer want anything to do with him - the relationship is over. You should settle with a man who respects you and understands that some things or behaviors need to be done away once committed in a relationship.
He might have been a nice guy and you've been in the relationship for long; but remember people change and they develop a different perspective pertaining to relationship.
I hope you will find your feet and move on. Don't cling to the fact he is still the nice guy you knew.