This paper proposes a novel method for active collision avoidance to protect the human who enters a robot’s workspace in a human-robot collaborative environment. The proposed method uses a somatosensory sensor to monitor the robot’s workspace and detect anyone attempting to enter it. When someone enters the workspace, a Kinect detects and calculates the position of his or her skeleton points in real-time. However, due to the measurement errors and noise of the device, the tracking error increases over time. Therefore, the proposed method applies an improved particle filter (IPF) to accurately estimate the position of the skeleton points. In order to detect the human-robot collision in real-time, the proposed method uses cylinders to establish the bounding box model for human bones and robots and the human-robot collision is replaced by the collision between the cylinders, greatly improving the efficiency of collision detection. Moreover, taking human safety and productivity into account, the robot velocity control is carried out based on the distance between the robot and human. Then, the proposed method uses a rule-based logic system to analyze human motion so that the robot can take appropriate measures to avoid humans. Finally, the dynamic roadmap (DRM) approach plans new paths in real-time to allow robots to bypass humans. By actively avoiding collisions, the proposed method ensures that the robot will never touch the human body. The significant advantage of the proposed method is that it can detect humans in real-time, analyze their behavior and protect humans without any modification to the robot. The proposed method has been tested in practical applications, and the results show that it can successfully guarantee the safety of people entering the robot’s workspace.