We have developed an Energy-Efficient Trajectory Generation Algorithm for space manipulators with reaction wheels under the constraint of fixed base orientation. By defining the manipulator joint trajectories as B-splines and imposing a constraint that the reaction wheel should precisely compensate for the rotational disturbance caused by the manipulator motion, we reformulate an optimal control problem as a constrained parameter optimization problem where the cost function is defined as the total energy consumption of the motors. To address the problem with the direct method, we derive a novel analytic gradient computation algorithm which recursively computes the torque sensitivity and determines the reaction wheel motion by solving the momentum conservation constraint. The complexity of the gradient computation is O(n (2) N (I) ) where n is the number of bodies and N (I) is the number of integration points. We show the effectiveness of the suggested method by two examples of trajectory optimization. In the first case, we verify the optimality of the solution trajectory using the planar space manipulator model with a two-joint arm and a reaction wheel. In the second case, we optimize the target berthing motion of the spatial space manipulator model with a seven-joint arm and three reaction wheels.