We present an analytical study of state transfer in a spin chain in the presence of an inhomogeneous set of exchange coefficients. We initially consider the homogeneous case and describe a method to obtain the energy spectrum of the system. Under certain conditions, the state transfer time can be predicted by taking into account the energy gap between the two lowest energy eigenstates. We then generalize our approach to the inhomogeneous case and show that including a barrier in the chain can lead to a reduction of the state transfer time. We additionally extend our analysis to the case of multiple barriers. These advances may contribute to the understanding of spin transfer dynamics in long chains where connections between neighboring spins can be manipulated.