The historical Buddha tried both available careers of his day — palace pleasure and forest asceticism, the second pursued to the point of skeletal collapse — and rejected both as roads that dead-end. The Middle Way is what he walked instead, but it is not arithmetic halfwayness (a little indulgence, a little starvation): it is the abandonment of the axis itself. Each extreme is a strategy for grabbing stability (through satiation or purification), and the middle is the recognition that experience's wobble (dukkha) comes from the grabbing. Nagarjuna later formalized the term into philosophy: emptiness is the middle between "things exist" and "things do not exist" — the position that avoids both extremes by refusing to absolutize either. Thus "middle" names not a compromise but a precision.
“There are two extremes not to be entered by one who has gone forth: devotion to pleasure, and devotion to pain. The middle way, awakened to by the Tathāgata, gives vision and knowledge — and leads to peace.”
Dhammacakkappavattana Sutta (trans. adapted)