M.R.
Keep putting him in time-out. Once or twice isn't going to fix it. He may need several trips before it sinks in. It will...TRUST me. My son used to be like this. If he so much as raises his arm as if to hit I just say "Time out?" in my mommy-questioning voice and he retreats immediately. What you're doing is fine - he just needs a little more time to adjust. Consistency is the key - every time he does it, even if it is 25 times in one day, the consequence remains the same.