Spin-controlled topological phase transition in non-Euclidean space