High-quality entangled photon pairs generated via spontaneous parametric down-conversion have made great contributions to the modern quantum information science and the fundamental tests of quantum mechanics. However, the quality of the entangled states decreases sharply when moving from biphoton to multiphoton experiments, mainly due to the lack of interactions between photons. Here, for the first time, we generate a four-photon Greenberger-Horne-Zeilinger state with a fidelity of 98%, which is even comparable to the best fidelity of biphoton entangled states. Thus, it enables us to demonstrate an ultrahigh-fidelity entanglement swapping-the key ingredient in various quantum information tasks. Our results push the fidelity of multiphoton entanglement generation to a new level and would be useful in some demanding tasks, e.g., we successfully demonstrate the genuine multipartite nonlocality of the observed state in the nonsignaling scenario by violating a novel Hardy-like inequality, which requires very high state-fidelity.