Measurement-device-independent quantum key distribution (MDI-QKD) is innately immune to all detection-side attacks. Due to the limitations of technology, most MDI-QKD protocols use weak coherent photon sources (WCPs), which may suffer from a photon-number splitting (PNS) attack from eavesdroppers. Therefore, the existing MDI-QKD protocols also need the decoy-state method, which can resist PNS attacks very well. However, the existing decoy-state methods do not attend to the existence of PNS attacks, and the secure keys are only generated by single-photon components. In fact, multiphoton pulses can also form secure keys if we can confirm that there is no PNS attack. For simplicity, we only analyze the weaker version of a PNS attack in which a legitimate user’s pulse count rate changes significantly after the attack. In this paper, under the null hypothesis of no PNS attack, we first determine whether there is an attack or not by retrieving the missing information of the existing decoy-state MDI-QKD protocols via statistical hypothesis testing, extract a normal distribution statistic, and provide a detection method and the corresponding Type I error probability. If the result is judged to be an attack, we use the existing decoy-state method to estimate the secure key rate. Otherwise, all pulses with the same basis leading to successful Bell state measurement (BSM) events including both single-photon pulses and multiphoton pulses can be used to generate secure keys, and we give the formula of the secure key rate in this case. Finally, based on actual experimental data from other literature, the associated experimental results (e.g., the significance level is 5%) show the correctness of our method.