I’m guessing you’re teenagers — if you write back tell me how old you both are. It sounds like he has mixed feelings about you, and he was honest that he isn’t interested in a relationship, which is why he rejected you. But he didn’t expect you to pull away, and now that you have, he’s in a bind because he doesn’t want you to go, but he knows he can’t keep you around without dating you properly. His acting out and seemingly irrational behavior is his way of connecting with you, even though it’s inappropriate — it’s still a connection. He’s trying to figure out, on some level, how to keep you in his life, or let you go, and he’s struggling. That’s what you’re seeing.
I hope that helps. Let me know if you have any other questions. 😉