Put one foot in the stirrup and hop on the other foot. If he tries to walk hold him back. If he stays still, stop, take your foot out and walk a few steps.
Repeat until he doesn't make any attempt to walk.
Then you hop and if he stays still you go on with your belly on the saddle and pet him. Then get off if he stays still. If he walks, hold him back and when he stops you get off and repeat.
Once he stands still at the hooping and the belly part, get on, give him a cookie and sit still.
Always get on and stay still for a minute or two and then walk off. If you get on and go you will teach him to rush as soon as you get on.
What I said above is to be done every single time you or anyone else rides the horse.
He will soon be calm and relaxed and wait for your signal to go.
Mark is right, try to know if your horse is suffering, that would explain why he want to leave when you are about to get on his back!
First try to know if it is just a bad habit or linked to a pain (back, limbs, mouth). If it is a bad habit, well, you should start working on it! Put your horse in front of a corner so he cannot escape or move. Or ask someone to stay just in front of your horse. Gradually, the person backs up a little bit or comes forward if the horse moves.
It is a mounting block problem. I think the easiest and most effective is to
take back everything from the beginning... Try to get on your horse, if he moves, stop him and try again and so on. To be sincere, it can take a lot of time. Ask someone to stay in front of your horse to prevent him from moving.
Hold your reins more firmly and short. And when he tries to leave, say "no" or "stop" with a severe voice! If he still does not listen to you, you should try to make special exercises in hand to work on it with him.