The invention provides a method for extracting tungsten carbide and cobalt from waste hard alloy, and belongs to the technical field. The method comprises the following steps: S1, crushing a hard waste alloy into particles, then loading into an electrolytic small box, placing in an electrolysis tank, electrolyzing, adding hydrochloric acid as an electrolyte solution, starting up a heater, and electrolyzing the electrolyte solution cyclically continuously under the action of an acid-resistant pump; S2, when the specific gravity of cobalt chloride in the electrolyte solution reaches 1.15-1.24 kg/dm<3>, pumping the electrolyte solution containing cobalt chloride into a storage tank, soaking the alloy particles with clear water, and then drying the alloy particles; and S3, carrying out magnetic separation of the dried alloy particles, smashing a cobalt-containing magnetic absorption material into particles with the diameter of 1-6 mm by an air heavy hammer, then loading into the electrolysis tank, electrolyzing again, and separating to obtain tungsten carbide and a cobalt chloride solution. By improvement of the electrolysis tank and the electrolytic process, the cobalt content in thefinished tungsten carbide product after electrolysis is completed is about 0.07%.