A near-infrared (NIR) measurement based on digital orthogonal vector lock-in amplifier (LIA) is present in this paper. NIR sky background radiation is very weak. To detector the signals obscured by noise, the best way achieved is to use a chopper to modulate the detected signal and using a LIA to demodulate. The effect of 1/f noise of detector, dark current and other noises can be reduced to get sufficient signal-to-noise ratio (SNR). The orthogonal vector LIA can avoid the phase shift on the accuracy of measurement by two orthogonal components. In order to simplify the system, a digital algorithm is adopted to realize the LIA which is operated in a microcontroller with ARM cortex-M4. Data is obtained through ADC and the detector signal is amplified and filtered. Then the phase sensitive detection (PSD), low-pass filter (LPF) and amplitude phase calculation are performed. The digital method can greatly simplify the circuit, and conveniently adjust the time constant of the LPF to realize the different equivalent noise bandwidth (ENB). The algorithm has the specification of high precision, flexible usage, simple implementation and low computation resource. By using this method, the weak infrared signal submerged by the noise can be obtained, which extremely improves the detection capability of the system.