Superconductivity in the iron pnictides develops near antiferromagnetism, and the antiferromagnetic (AF) phase appears to overlap with the superconducting phase in some materials such as BaFe(2-x)T(x)As2 (where T=Co or Ni). Here we use neutron scattering to demonstrate that genuine long-range AF order and superconductivity do not coexist in BaFe(2-x)Ni(x)As2 near optimal superconductivity. In addition, we find a first-order-like AF-to-superconductivity phase transition with no evidence for a magnetic quantum critical point. Instead, the data reveal that incommensurate short-range AF order coexists and competes with superconductivity, where the AF spin correlation length is comparable to the superconducting coherence length.