"Habs" is short for "habitants" or "habitants du Montreal." There are two stories as to the origin of this name: that it was coined by New York Rangers owner Tex Rickard, and that it was a reference to the distinctive dress of Canadiens fans in the 1910s.
When the Canadiens played at Westmount Arena in the early 1900s, they shared the space with another team, the Montreal Wanderers. One story has Canadiens fans dressing in colorful belts and moccasins to differentiate themselves, leading to the local sports media referring to them as the "Habitants" in the newspapers.
The two origin stories are not mutually exclusive, as Tex Ricard is though to be the first to shorten the nickname to "Habs" when speaking to the American media about them in the 1920s.