Skilled movement often requires flexibly combining multiple subskills, each requiring dedicated control strategies and underlying computations. How the motor system achieves such versatility remains unclear. Using high-density Neuropixels recordings from primary motor cortex (M1) in macaques performing a challenging force-tracking task, we reveal that M1 activity is much higher-dimensional, and far more flexible, than traditionally assumed. Although our task employed only a single external degree of freedom, neural dynamics reflected transitions amongst many dimensions and multiple distinct computations. Different behavioral control strategies were associated with distinct neural locations and dimensions, sometimes used compositionally. Groups of population-level factors became active when a particular form of dynamics was needed, and remained silent otherwise. Neural activity was thus dominated by the engaged subskill, and could be very different even for matched motor output. These findings challenge prevailing views of M1, and reveal an unexpectedly flexible and high-dimensional neural system underlying skilled motor behavior.