Objective: Muscle path modeling is more than just routing a cable that visually represents the muscle, but rather it defines how moment arms vary with different joint configurations. The muscle moment arm is the factor that translates muscle force into joint moment, and this property has an impact on the accuracy of musculoskeletal simulations. However, it is not easy to calibrate muscle paths based on a desired moment arm, because each path is configured by various parameters while the relations between moment arm and both the parameters and joint configuration are complicated. Methods: We tackle this challenge in the simple fashion of optimization, but with an emphasis on the gradient; when specified in its analytical form, optimization speed and accuracy are improved. Re- sults: We explain in detail how to differentiate the enormous cost function and how our optimization is configured, then we demonstrate the performance of this method by fast and accurate replication of muscle paths from a state-of- the-art shoulder-arm model. Conclusion and Significance: As long as the muscle is represented as a cable wrapping around obstacles, our method overcomes difficulties in path calibration, both for developing generic models and for customizing subject-specific models.