Inverse problems in dynamics are the basic problems in astronautics, rocket dynamics, and motion planning theory, etc. Mei symmetry is a kind of new symmetry where the dynamical function in differential equations of motion still satisfies the equation's primary form under infinitesimal transformations of the group. Mei symmetry and its inverse problem of dynamics for a general holonomic system in generalized coordinates are studied. Firstly, the direct problem of dynamics of the system is proposed and solved. Introducing a one-parameter infinitesimal transformation group with respect to time and coordinates, the infinitesimal generator vector and its first prolonged vector are obtained. Based on the discussion of the differential equations of motion for a general holonomic system determined by n generalized coordinates, their Lagrangian and non-potential generalized forces are made to have an infinitesimal transformation, the definition of Mei symmetry about differential equation of motion for the system is then provided. Ignoring the high-order terms in the infinitesimal transformation, the determining equation of Mei symmetry is given. With the aid of a structure equation which the gauge function satisfies, the system's corresponding conserved quantities are derived. Secondly, the inverse problem for the Mei symmetry of the system is studied. The formulation of the inverse problem of Mei symmetry is that we use the known conserved quantity to seek the corresponding Mei symmetry. The method is: considering a given integral as a Noether conserved quantity obtained by Mei symmetry, the generators of the infinitesimal transformations can be obtained by the inverse Noether theorem. Then the question whether the obtained generators are Mei symmetrical or not is verified by the determining equation, and the effect of generators' changes on the symmetries is discussed. It has been shown from the studies that the changes of the generators have no effect on the Noether and Lie symmetries, but have effects on the Mei symmetry. However, under certain conditions, while adjusting the gauge function, changes of generators can also have no effect on the Mei symmetry. In the end of the paper, an example for the system is provided to illustrate the application of the result.