A method and apparatus for treating wastes by gasification recovers metals or ash content in the wastes in such a state that they can be recycled, and gases containing carbon monoxide (CO) and hydrogen (H2) for use as synthesis gas of ammonia (NH3). The wastes are gasified in a fluidized-bed reactor at a relatively low temperature, and gaseous material and char produced in the fluidized-bed reactor are introduced into the high-temperature combustor. The synthesis gas is produced in the high-temperature combustor at a relatively high temperature, CO and H2O in the synthesis gas is converted into CO2 and H2, and then H2 is recovered by removing CO2.