The ground state of interacting spin chains in external magnetic fields can undergo a quantum phase transition (QPT) characterized by dramatic changes at a critical value of the magnetic field. In this paper, we use Bell-type inequalities to study the multipartite correlations (including multipartite entanglement and multipartite nonlocality in an n-spin subsystem) in the QPT of an infinite XY chain. An efficient numerical optimization procedure is proposed to figure out the violation measure Mn of the inequalities. For n≤7, the magnetic-field...