A handheld electronic device including a connection interface, a voltage supply unit and a baseband circuit is provided. When headphones are connected to the handheld electronic device, the baseband circuit can determine the type of the headphones by controlling the operation of the voltage supply unit. Furthermore, when the headphones are noise-canceling headphones, the baseband circuit can control the operation of the voltage supply unit to provide operation power to the noise-canceling headphones. In addition, corresponding noise-canceling headphones including a connection interface, at least one switch circuit, a switch control unit, a communication microphone, two speakers, a noise-canceling circuit and two noise-canceling microphones is also provided.