To address the problem of poor tracking and control in free-floating space robots working in path-dependent workspaces (PDWs), in this paper, we propose a trajectory planning and tracking algorithm based on singularities avoidance to facilitate the trajectory tracking task of the end-effector. First, we analyze the singularity condition and design a safe margin, and then determine a trajectory with singularity avoidance and the initial configurations by solving the margin value of the base altitude. Secondly, since the nonlinear dynamic model of the free-floating space robot is characterized by a linear-like structure with a state-dependent coefficient, we design the tracking controller based on the state-dependent Riccati equation (SDRE) to track the velocity of the end-effector. This guarantees the locally asymptotical stability of the closed-loop system. As a result, we can overcome the shortcoming of traditional methods of the workplace being limited to path-independent workspaces (PIWs). The simulation results show than, compared to PD control, the proposed algorithm has better tracking accuracy and achieves effective tracking when subjected to input disturbance.