We report an experimental quantum simulation of unitary dynamics of an XY spin chain with pre-engineered couplings. Using this simulation, we demonstrate the mirror inversion of quantum states, proposed by Albanese et al. [Phys. Rev. Lett. 93, 230502 (2004)]. The experiment is performed with a 5-qubit dipolar coupled spin system using nuclear magnetic resonance techniques. To perform quantum simulation we make use of the recently proposed unitary operator decomposition algorithm of Ajoy et al. [Phys. Rev. A 85, 030303 (2012)] along with numerical pulse optimization techniques. Further, using mirror inversion, we demonstrate that entangled states can be transferred from one end of the chain to the other end. The simulations are implemented with high experimental fidelity, which implies that these kind of simulations may be possible in larger systems.