In this paper, a nonlinear model predictive control (NMPC) is designed for redundant robotic manipulators in non-stationary environments. Using NMPC, the end-effector of the robot could track predefined desired path and reaches a moving target in the Cartesian space, while at the same time avoids collision with moving obstacles and singular configurations in the workspace. To avoid collisions with moving obstacles and capturing moving target, the future position of obstacles and the moving target in 3D space is predicted using artificial neural networks. Using online training of the neural network, no knowledge about obstacles and motion of the moving object is required. The nonlinear dynamic of the robot including actuators dynamic is also considered. Numerical simulations performed on a 4DOF redundant spatial manipulator actuated by DC servomotors, shows effectiveness of the proposed method.