Born in Zhezhava (now Zelenyi Hai, Zalishchyky Raion) or Lviv in Austrian Galicia (now in the Ternopil Oblast in Ukraine), since 1832 he studied philosophy and philology at the University of Lwow. He participated in the November Uprising. In 1834, he was arrested by the Austrian authorities in Lviv on accusations of having participated in underground subversive activities, and in 1836 sent into confinement to Ljubljana, Duchy of Carniola (now in Slovenia), together with , where they arrived in late January 1837.