Herobrine is a creepy pasta, totally made up by the Minecraftian community.
However Mojang has mentioned him & observed his popularity enough to add him as a joke in the update logs saying that they removed him.
So he never really officially existed in Minecraft so far, however I did have a weird moment on single player about 2 months ago, I was in a dark area building with a night vision potion active, all of a sudden it the screen turns pitch black. I looked in my inventory and it still said there were several minutes until the potion wears off, I dig straight up to get some light and I could swear I saw a player tag right freakin behind me! I then left the building & deleted the world...
Perhaps they added him or maybe it was a glitch? I don't know but it was creepy as heck at the time...