Mechanical descriptor systems, i.e., constrained mechanical systems, have many applications in practice. This paper studies the control of mechanical descriptor systems. First, a class of the state feedback controllers assigning the finite poles of mechanical descriptor systems at any desired locations is presented. Second, based on the degrees of freedom of pole-assignment controller, an optimization method for designing the controller that assigns the finite poles of closed-loop mechanical descriptor system and simultaneously minimizes a quadratic performance index is proposed. The necessary condition for the pole-assignment controller to be optimal is derived and the corresponding algorithms are discussed. An example is given to illustrate the validity of method in this paper.