A method for operating a hydrogen generator, the hydrogen generator comprising the reformer, a water evaporator, a raw material supply passage, a steam supply passage, a pressure releasing device, a pressure releasing exhaust passage, and a cooler, the method comprising: supplying raw material to a reforming catalyst of the reformer through the raw material supply passage; generating steam with the water evaporator; supplying the steam generated in the water evaporator to the reforming catalyst of the reformer through the steam supply passage; steam reforming the raw material and the steam in the reformer to generate a hydrogen-containing gas; releasing a pressure by operating the pressure releasing device, provided at the raw material supply passage or the steam supply passage and flowing a gas exhausted from the pressure releasing device and containing the steam through the pressure releasing exhaust passage; and cooling the gas exhausted from the pressure releasing device and flowing through the pressure releasing exhaust passage with the cooler provided at the pressure releasing exhaust passage, wherein the pressure releasing device includes an on-off device for performing a pressure release operation to preferentially exhaust the material gas and the steam which are present upstream of the reforming catalyst of the reformer, and wherein, during generation of the hydrogen-containing gas in the reformer, the pressure releasing device performs the pressure release operation, when the pressure in the raw material supply passage or the steam supply passage, which is provided with the pressure releasing device, reaches a predetermined pressure or more and a pressure rises in the reformer, the generated gas exhaust passage or a device outside the hydrogen generator which is connected to a downstream side of the generated gas exhaust passage. supplying raw material to a reforming catalyst of the reformer through the raw material supply passage; generating steam with the water evaporator; supplying the steam generated in the water evaporator to the reforming catalyst of the reformer through the steam supply passage; steam reforming the raw material and the steam in the reformer to generate a hydrogen-containing gas; releasing a pressure by operating the pressure releasing device, provided at the raw material supply passage or the steam supply passage and flowing a gas exhausted from the pressure releasing device and containing the steam through the pressure releasing exhaust passage; and cooling the gas exhausted from the pressure releasing device and flowing through the pressure releasing exhaust passage with the cooler provided at the pressure releasing exhaust passage, wherein the pressure releasing device includes an on-off device for performing a pressure release operation to preferentially exhaust the material gas and the steam which are present upstream of the reforming catalyst of the reformer, and wherein, during generation of the hydrogen-containing gas in the reformer, the pressure releasing device performs the pressure release operation, when the pressure in the raw material supply passage or the steam supply passage, which is provided with the pressure releasing device, reaches a predetermined pressure or more and a pressure rises in the reformer, the generated gas exhaust passage or a device outside the hydrogen generator which is connected to a downstream side of the generated gas exhaust passage. <EOS>