We define and study the Stockwell transform \(\mathscr {S}_g\) associated with the Sturm-Liouville operator \(\Delta :=\frac{\text{ d}^2}{\text{ d }x^2}+\frac{A'(x)}{A(x)}\frac{\text{ d }}{\text{ d }x}\) , where A is a nonnegative function satisfying certain conditions. Moreover, we define the localization operators \(L_{g}(\xi )\) associated with this transform. We study the boundedness and compactness of these operators and establish a trace formula. Finally, we give a Shapiro-type uncertainty inequality for the Sturm-Liouville-Stockwell transform \(\mathscr {S}_g\) . Some results related to the Hankel-Stockwell transform \(\mathscr {S}_{\alpha ,g}\) are deduced.