Humanoid head and neck robot, which is part of humanoid robot, is responsible for dynamic visual target tracking. In order to be able to accurately track the target, the centre of the robot's sight field serves as stretch link in the kinematics model of the humanoid head and neck robot. The target position calculated by the binocular camera system is translated to the aim point, where the link mechanism moves to in the mathematic model. Damped least squares inverse kinematics method, which is used to eliminated the joint singularity, is modified to make the redundant humanoid head and neck robot moves like human being. The modified algorithm not only makes the robot to avoid the singularity in the movement, but also guarantees joint limit avoidance, comfortable joint movement and produces natural-looking postures. Simulation and experiment results show that the modified algorithm is more robust and stable.