As greenhouse gas emissions from dairy farms are on the rise, effective monitoring of these emissions has emerged as a crucial tool for assessing their environmental impacts and promoting sustainable development. Most of the existing studies on GHGs from dairy farms involve stationary detections with long response times and high costs. In this study, a greenhouse gas detection system was constructed based on NDIR technology using a single broadband light source and a four-channel thermopile detector for the detection of CH4, N2O, and CO2; the detection range of CH4 was 0~100 ppm; that of N2O was 0~500 ppm; and that of CO2 was 0~20%. After the concentration calibration, the cross-interference between the gas measurement channels was studied, and the least-squares method was used to correct the interference between the three gases. The experimental results showed that the full-range deviation of the detection device was lower than 0.81%, the repeatability was lower than 0.39%, the stability was lower than 0.61%, and the response time was lower than 10 s. This study also carried out on-site testing in Luoyang Shengsheng Ranch (Luoyang, China), and the results show that the error between this device and the PTM600 portable gas analyzer is within 9.78%, and the dynamic response time of this device is within 16 s, at which point the content of greenhouse gases in dairy farms can be measured quickly and accurately. The objective of this study is to enhance the precision and effectiveness of greenhouse gas (GHG) emissions monitoring from dairy farms, thereby contributing to environmental protection and sustainable development goals. By achieving this, we aim to facilitate societal progress towards a greener and low-carbon future.