With the large-scale and complexity of ship propulsion shafting, it is more difficult to analyze and control the torsional vibration of shafting. Therefore, an effective control method for the torsional vibration of shafting is of great significance in the field of ship engineering. The main strategy of torsional vibration control adopted in this paper is to keep the natural frequency of a shaft system away from the excitation frequency through structural modifications. In addition, because the basic parameters of much of the equipment in engineering applications cannot be changed, this restriction cannot be ignored when seeking solutions related to structural modifications. This paper studies the partial eigenvalue assignment for the torsional vibration control of complex ship propulsion shafting using the gradient flow method, which can shift a “dangerous” natural frequency to a safe value, while satisfying complex physical constraints. The models of a ship propulsion system and a diesel generator set are established to demonstrate several different desired modification schemes and constraint conditions in practice. In particular, close frequencies are shifted. The numerical simulation results demonstrate that it is effective and feasible to make a partial frequency assignment of torsional vibration, which provides a reliable approach for the control of torsional vibration for complex shaft systems in practical engineering.