Chlorine is widely used for sterilization and disinfection of water, but the presence of excess residual chlorine in water poses a substantial threat to human health. At present, there is no portable device which can achieve accurate, rapid, low-cost, and convenient detection of residual chlorine in water. Therefore, it is necessary to develop a device that can perform accurate, rapid, low-cost, and convenient detection of residual chlorine in water. In this study, a portable residual chlorine detection device was developed. A microfluidic chip was studied to achieve efficient mixing of two-phase flow. This microfluidic chip was used for rapid mixing of reagents in the portable residual chlorine detection device, reducing the consumption of reagents, detection time, and device volume. A deep learning algorithm was proposed for predicting residual chlorine concentration in water, achieving precise detection. Firstly, the microfluidic chip structure for detecting mixed reagents was optimized, and the microfluidic chip was fabricated by a 3D-printing method. Secondly, a deep learning (LS-BP) algorithm was constructed and proposed for predicting residual chlorine concentration in water, which can realize dual-channel signal reading. Thirdly, the corresponding portable residual chlorine detection device was developed, and the detection device was compared with residual chlorine detection devices and methods in other studies. The comparison results indicate that the portable residual chlorine detection device has high detection accuracy, fast detection speed, low cost, and good convenience. The excellent performance of the portable residual chlorine detection device makes it suitable for detecting residual chlorine in drinking water, swimming pool water, aquaculture and other fields.