The invention discloses a method for treating waste water in aerobic and two-stage anoxic-aerobic ways. The waste water flows through a regulating tank, a primary aeration tank, a primary settling tank, an anoxic tank, a first-stage aerobic tank, a secondary settling tank, an aerobic tank, a second-stage aerobic tank, a triple settling tank, a coagulation reaction tank, a coagulation settling tank and a decolorizing tank in sequence, so that water is finally discharged within controlling indexes of the national standard. The anoxic tank, the first-stage aerobic tank and the secondary settling tank construct a first-stage anoxic-aerobic system; and the aerobic tank, the second-stage aerobic tank and the triple settling tank construct a second-stage anoxic-aerobic system. After treatment, the removing efficiencies of major organic pollutants, particularly ammonia nitrogen and total nitrogen in the coal chemical industry are increased greatly; due to the arrangement of a two-stage anoxic-aerobic system, the reflux amount of a nitration liquid is reduced, system energy consumption is lowered, and the removing efficiency of total nitrogen is increased greatly simultaneously; and due to the arrangement of a coagulation, decolorizing and reaction unit, the COD (Chemical Oxygen Demand) of discharged water is further lowered, and decolorizing, sterilizing and deodorizing functions are realized.