We propose a feasible and efficient scheme to complete hyperentanglement-assisted multi-photon Greenberger–Horne–Zeilinger (GHZ) states analysis with the quantum nondemolition detectors (QNDs). Firstly, we unambiguously distinguish the two-photon Bell states and three-photon GHZ states in polarization degree of freedom (DOF) assisted with the frequency DOF. Then, we show that the scheme can be extended to the N-photon (N>3) GHZ states in polarization DOF analysis, and moreover, the entanglement in polarization DOF is not disturbed by our operations. All these advantages make this scheme more meaningful in quantum information processing.