With the widespread application of collaborative robots in automated production, it is necessary to improve human safety that has become a noteworthy issue in human-robot collaboration (HRC) manufacturing process. This paper proposes a human-robot collaborative security system based on human intention recognition. Firstly, this system collects collaborative environment information through a camera and inputs the collected information into a data-driven platform. Secondly, action recognition algorithms and facial feature recognition algorithms for human detections are used to identify the angles of human actions and faces in the collaborative environment. Then, human intentions are identified by combining facial angle and action recognition results, which can obtain intention information into the control system. Finally, the security system conducts the robot to respond accordingly based on the obtained intention recognition results, which can improve the safety of human-robot collaboration and ensure high efficiency under safety production.