We consider an inhomogeneous quantum phase transition across a multicritical point of the XY quantum spin chain. This is an example of a Lifshitz transition with a dynamical exponent z = 2. Just like in the case z = 1 considered by Dziarmaga and Rams (2010 New J. Phys. 12 055007), when a critical front propagates much faster than the maximal group velocity of quasiparticles v(q), then the transition is effectively homogeneous: the density of excitations obeys a generalized Kibble-Zurek mechanism and scales with the sixth root of the transition rate. However, unlike for the case z = 1, the inhomogeneous transition becomes adiabatic not below vq but at a lower threshold velocity (v) over cap, proportional to the inhomogeneity of the transition, where the excitations are suppressed exponentially. Interestingly, the adiabatic threshold (v) over cap is nonzero despite the vanishing minimal group velocity of low-energy quasiparticles. In the adiabatic regime below (v) over cap, the inhomogeneous transition can be used for efficient adiabatic quantum state preparation in a quantum simulator: the time required for the critical front to sweep across a chain of N spins adiabatically is merely linear in N, while the corresponding time for a homogeneous transition across the multicritical point scales with the sixth power of N. What is more, excitations after the adiabatic inhomogeneous transition, if any, are brushed away by the critical front to the end of the spin chain.