We derive exact results for the Lindblad equation for a quantum spin chain (one-dimensional quantum compass model) with dephasing noise. The system possesses doubly degenerate nonequilibrium steady states due to the presence of a conserved charge commuting with the Hamiltonian and Lindblad operators. We show that the system can be mapped to a non-Hermitian Kitaev model on a two-leg ladder, which is solvable by representing the spins in terms of Majorana fermions. This allows us to study the Liouvillian gap, the inverse of relaxation time, in detail. We find that the Liouvillian gap increases monotonically when the dissipation strength γ is small, while it decreases monotonically for large γ, implying a kind of phase transition in the first decay mode. The Liouvillian gap and the transition point are obtained in closed form in the case where the spin chain is critical. We also obtain the explicit expression for the autocorrelator of the edge spin. The result implies the suppression of decoherence when the spin chain is in the topological regime.