Why did he lie about liking me?

There's this guy I've had a crush on for about 2 months now. About 2 days ago, I gained enough courage to say "hi" to him when he walked past me in the hallway. He looked at me, smiled, and then said it back. Well, I found him on Facebook and added him. About 10 minutes later he accepted and we started talking. He asked me if I liked him and I said, "a little," I was too scared to ask him back. I'm not very social :/ But, he replied "I like you too." I had a 10 second mini dance party in my chair and I didn't know what to say so I just said "awh" and then put a heart next to it. The next day, I saw him and he came up and hugged me. It was seriously the best thing EVER. When it was time for lunch I went into the cafeteria and sat next to him and we talked for the entire thing. My friend who is also friends with him, asked if I liked him and I said yes. The next day, she comes up to me and said she asked him if he liked me and said "Nah I don't like that ugly girl." He tried to talk to me but I just ignored him and he kept asking why I was avoiding him but I didn't answer. I asked her if there was anyone else around and she told me too and they all said the same thing and when I walked away I heard one of them say "aw, he broke her wittle heart." Then my crush came up to me and tried to talk but I avoided him all day. If he didn't like me, why did he have to lie? And why was he so mean about it?
Why did he lie about liking me?
Post Opinion