Hanslick was born in Prague (then in the Austrian Empire), the son of Joseph Adolph Hanslik, a bibliographer and music teacher from a German-speaking family, and one of his piano pupils, the daughter of a Jewish merchant from Vienna.
In 1854 he published his influential book On the Beautiful in Music.