The invention belongs to the field of environmental monitoring, and discloses an instrument capable of automatically measuring the content of organic matters in surface water and sewage, in particular to an automatic instrument for measuring the content of total organic carbon (TOC) in water, and can realize full-automatic measurement process and meet the national requirements for measurement technical indexes. The infrared TOC analyzer consists of a total carbon measuring system, an inorganic carbon measuring system, a data processing system and a control system, wherein, the control system controls the processes of the total carbon measuring system and the inorganic carbon measuring system and transmits output signals to the data processing system; the total carbon measuring system comprises an automatic sample injection unit, a heating-burning unit and an optical measurement unit; and the inorganic carbon measuring system comprises an acidification unit, a pre-purge unit and an optical measurement unit. By adopting the infrared TOC analyzer, the problem of low temperature in the traditional heating method is solved during the TOC measurement process so that the burning temperature is improved to 1200 DEG C, thus a water sample can be more fully burned and the measurement accuracy is improved; and meanwhile the problems such as a small quantity of the water samples, thermal radiation interference and TOC-COD (chemical oxygen demand) integrated measurement are solved. Therefore, the infrared TOC analyzer is applicable to measuring the content of the TOC in various types of water in the environmental monitoring field and other fields.