Group-feeding has been an ever-increasing trend for pregnant sows in recent years. However, the existing feeding system cannot fully meet the needs of the small-group pregnant sows, due to the feeding obstruction from the abnormally closed door of the feeding passage when sows climbing. In this study, a self-locking intelligent feeding system was designed for the small-group pregnant sows using a five-link RRRSR mechanism. A self-locking feeding passage was also equipped with the full mechanical structure and a precise feeding device. The full mechanical structure was mainly composed of a front door, a rear door, and a passage frame. The spatial RRRSR five-bar mechanism with the single-loop linkages included the front door, the rear door, the front door connector, the intermediate connecting rod, and the passage frame. Among them, there was one freedom of motion using the frame breaking, in which the front door had a dead point during rotation. The self-locking and interlocking between the front and rear doors of the feeding passage were realized for the spatial linkage mechanism, according to the characteristics of the self-locking at the dead point and the fixed-axis rotation. The kinematics simulation showed that the front door was opened, while the rear door was closed, whereas, the front door was closed, while the rear door was opened. The maximum retractable angles of the front and rear doors were 92°, and 63.32°, respectively. Once the front and rear doors were fully open, the sows passed through the feeding passage. The rear door effectively blocked the sows outside the feeding passage when the front and rear doors were closed at the same time. The dynamic simulation results showed that the maximum torque values were 8.95 and 40.14 N·m to rotate the front and rear door, respectively. Correspondingly, the arm of forces were about 0.3 and 0.5 m to push the front and rear doors, respectively. The thrust fully met the design requirements that required rotating the front and rear doors. As such, the sows were able to push the front and rear doors of the feeding passage, whereas, the rear door was closed properly to prevent the sow from climbing. FreeRTOS real-time operating system was selected in the control system to divide the feeding process into the feeding, water supply, identification, data display, and storage. Once the rear door was opened, the weights of totally weighing-100 kg were suspended from the rear door to simulate the sows climbing the rear door of the feeding passage. The results showed that the feeding passage door of the improved system was achieved in the stable self-locking, further preventing the rear-door abnormal closing of the feeding passage from the sows climbing, indicating the undisturbed feeding of a single sow. Twenty-four single-circle feeding accuracy tests were performed on the feeding device using granular sow feed. It was found that the standard feeding quantity of a single circle was 113.6 g, and the maximum relative error of feeding was less than 2.02%. Five standard water volumes (including 100, 150, 200, 250, and 300 ml) were selected at the same time in the precision test of the water supply. Each group of the test was repeated 8 times for reproducibility. The maximum relative error of the supplying water was less than 1.80%. The errors of feeding and flowing were reduced by 0.4 and 2.2 percentage points, respectively, which fully met the precision feeding requirements of sows in the actual production. The finding can also provide a technical reference for the precision feeding system with the self-locking function for the small groups of pregnant sows. [ABSTRACT FROM AUTHOR]