K.S.
This is hard to do. And you should plan on getting no sleep the night that you plan it. (And if you do it, you need to REALLY do it. No wishy washy and giving in at 3 a.m.!) But you either need to secure him in his room, or secure him OUT of yours. We locked our bedroom door so my son couldn't sneak in during the middle of the night. The first time he banged on the door, I opened the door only a tiny little crack, crouched down to his level and said "Mommy and Daddy are going nigh night. You should go back to your bed. I love you. I'll see you in the morning." Then I closed the door and did my best to ignore the banshee screaming and banging. We didn't open the door or say anything else to him. It was hard, but darn if he didn't go back to bed (eventually) that night. That first night was the worst. He did try to open the door the next night, but he went back to bed on his own.