Your horse can benefit from you doing several things.
First and foremost, I would tie him up as far from the barn as you can. Tie him in a safe place or make a safe place to tie him. Then, let him learn to stand quietly all by himself. There are many threads on this forum explaining how this works. Read through all of them that you can find. This, alone, does more to settle a horse down and get them over being herd bound and barn sour than anything you can do in the saddle.
What you are trying to do now is argue with a horse that is in a reactive mode. They cannot do things right and you cannot improve behavior when they are reactive. Teaching him to stand quietly is the most important thing you can do for him.
Next, I would teach him a very good 'one rein stop'. This gives you a very effective tool to stop bad behavior. Being able to take his head away from him and have him stand perfectly still until he takes a big breath and relaxes will get him back to responding and not reacting. It is like 'installing and off button' in any horse. If keeps you from getting into pulling matches that the horse can win. Additionally, if gives you a way to control a horse with one rein. A horse cannot argue as well with one rein. When you try to hold a horse back with both reins, you actually give them leverage and their energy can start them rearing or prancing or hopping up and down. All of these are very negative things for a horse to practice. The more they do things like this, the more they want to do them.
Ideally, once you have tied him out and have him riding better, you can carry a lead-rope with you. Ride him off to a distant safe tying place. Get off there and let him stand tied until he is relaxed. When you get back on, ride away from the barn some more. Never just get on and go back. Horses learn these routines very quickly, so always keep one guessing -- and responding.
Something else to remember -- If a horse spins or ducks around toward the barn, always turn a horse back the opposite direction. Never go all the way around until the horse is facing the correct direction. As a matter of fact, I will turn the horse around 3 ties to the opposite direction before I let them go on the way we were headed. This is very important if you want a horse to stop ducking around.
Another thing I do is try to ride big circles and never ride straight out, turn around and ride straight back.
Another way to get horse over wanting to ride back to the barn is to work hard when you get back. I think this works better when you ride away from the barn at the end of a ride. Stop ONLY when you want to, get off well away from the barn, loosen the girth and always lead the horse back to the barn.
I carry this to every lesson I give. Students must get off of their horses on the far side of the ring after they stand quietly for 5-10 minutes. They cannot leave together and a different horse is the last horse to leave each time. Any horse get s anxious, it gets t stand tied for an hour out by the highway.
Consequently, barn sour horses just don't happen around here.