He's probably been fed a lot of treats and has come to expect them from everyone.
When the treats don't magically materialize, he follows you to see if you're going to produce one.
When you stop moving, he's going to nibble your pockets, escalating to biting you, looking for those treats.
Even if you have a treat and give it him, he'll still want another.
This is why over-treating is a bad idea. It leads to expectations, which leads to bad behavior, which leads to injured people and disappointed horses.
He needs retraining. Stay out of his pasture so he won't follow you. When/if you want to work with him, halter him and put him on a lead rope so you can control him. Keep your eye on him. If he goes to bite you, say "NO!" sharply. If he tries again, repeat that while yanking the lead rope once. When he desists, immediately reward him by loosening up on the lead.
This will take time and effort, and NO TREATS.