A substance detecting device (1, 1A, 1B, 1C, 1D) comprising: a transmitter (LD, LD1) that emits wavelength-modulated invisible light (LS, LS1) through wavelength modulation with a first wavelength at the center; a first receiver (PD, PD0) that receives reflected light (RV, RV1) of the wavelength-modulated invisible light (LS, LS1) reflected inside a detection region of a detection target substance; a detector (27, 27A, 27B) that detects the detection target substance, based on the reflected light (RV, RV1); an actuator that changes an emitting direction of the wavelength-modulated invisible light (LS, LS1) and a receiving direction of the reflected light (RV, RV1); a reference cell, in which the detection target substance is stored, outside the detection region; a second receiver (PD, PD2) that receives passing light of the wavelength-modulated invisible light (LS, LS1) passing through the reference cell; and a wavelength controller (12, 12A) that adjusts a temperature of the transmitter (LD, LD1) and controls the first wavelength and characterized in that the wavelength controller (12, 12A) controls the first wavelength such that an output from the second receiver (PD, PD2) has a frequency twice a modulation frequency of the first wavelength-modulated invisible light (LS, LS1) and the frequency twice the modulation frequency is constant, and the substance detecting device (1, 1A, 1B, 1C, 1D) is configured to drive the actuator such that the transmitter (LD, LD1) emits the wavelength-modulated invisible light (LS, LS1) to each position inside the detection region and, then, emits the wavelength-modulated invisible light (LS, LS1) to the outside of the detection region, such that the wavelength-modulated invisible light (LS, LS1) is transmitted through the reference cell, or that the transmitter (LD, LD1) emits the wavelength-modulated invisible light (LS, LS1) to positions adjacent to each other in a predetermined direction in the detection region and, then, emits the wavelength-modulated invisible light (LS, LS1) to the outside of the detection region, such that the wavelength-modulated invisible light (LS, LS1) is transmitted through the reference cell. a transmitter (LD, LD1) that emits wavelength-modulated invisible light (LS, LS1) through wavelength modulation with a first wavelength at the center; a first receiver (PD, PD0) that receives reflected light (RV, RV1) of the wavelength-modulated invisible light (LS, LS1) reflected inside a detection region of a detection target substance; a detector (27, 27A, 27B) that detects the detection target substance, based on the reflected light (RV, RV1); an actuator that changes an emitting direction of the wavelength-modulated invisible light (LS, LS1) and a receiving direction of the reflected light (RV, RV1); a reference cell, in which the detection target substance is stored, outside the detection region; a second receiver (PD, PD2) that receives passing light of the wavelength-modulated invisible light (LS, LS1) passing through the reference cell; and a wavelength controller (12, 12A) that adjusts a temperature of the transmitter (LD, LD1) and controls the first wavelength and characterized in that the wavelength controller (12, 12A) controls the first wavelength such that an output from the second receiver (PD, PD2) has a frequency twice a modulation frequency of the first wavelength-modulated invisible light (LS, LS1) and the frequency twice the modulation frequency is constant, and the substance detecting device (1, 1A, 1B, 1C, 1D) is configured to drive the actuator such that the transmitter (LD, LD1) emits the wavelength-modulated invisible light (LS, LS1) to each position inside the detection region and, then, emits the wavelength-modulated invisible light (LS, LS1) to the outside of the detection region, such that the wavelength-modulated invisible light (LS, LS1) is transmitted through the reference cell, or that the transmitter (LD, LD1) emits the wavelength-modulated invisible light (LS, LS1) to positions adjacent to each other in a predetermined direction in the detection region and, then, emits the wavelength-modulated invisible light (LS, LS1) to the outside of the detection region, such that the wavelength-modulated invisible light (LS, LS1) is transmitted through the reference cell.