In this study, amphiphilic thiosemicarbazone was used to align liquid crystal (4‐cyano‐4′‐pentylbiphenyl) in a homeotropic way on polyimide containing alkyl pendent groups (AHDPI), which was coated on a glass slide. The amphiphilic ligands 2‐(4‐(dodecyloxy)benzylid‐ene)hydrazine‐1‐carbothioamide (DT) and 2‐(1‐dodecyl‐2‐oxoindolin‐3‐ylidene)hydrazine‐1‐carbothioamide (IT) were doped with liquid crystal (LC) to develop LC‐based sensors to detect Hg2+ ions in water. The selective interaction of carbothioamide with Hg2+ ions triggered the orientation transition of LC from homeotropic to parallel alignment and gave dark to bright optical signal at the LC/aqueous interphase. Self‐immobilization of thiosemicarbazone‐based ligands on AHDPI‐coated glass slide can be used to detect Hg2+ ions with high sensitivity. The limit of detection with DT and IT was found to be 0.5 and 0.25 μmol L−1, respectively. Density functional studies were carried out to study the interaction of the thiosemicarbazone ligands with mercuric ions, resulting in highly negative binding energies of −1.55 and −2.06 eV for DT and IT with Hg2+ ions, respectively. The chemical and thermal stability (up to 268 °C) of the AHDPI coated on glass slide made it reusable at least twice for sensor fabrication. This provides a quicker and cheaper alternative to traditional methods of sensor fabrication. © 2024 Society of Chemical Industry.