Before his enlightenment, Siddhartha Gautama practiced extreme asceticism, nearly starving himself in pursuit of spiritual realization. Upon nearly dying and gaining no special insight, he recognized that torturing the body does not free the mind. He then accepted nourishment and discovered the Middle Way.
This principle extends beyond lifestyle to epistemology and metaphysics. The Middle Way navigates between eternalism (belief in permanent, unchanging self) and nihilism (belief in total non-existence after death). Buddhist philosophy avoids both extremes, teaching dependent origination—that phenomena arise through conditions without possessing permanent essence.
The Middle Way is not compromise or mediocrity but discernment of what conduces to awakening. It requires wisdom to distinguish between beneficial and harmful extremes, courage to resist cultural pressures toward either pole.
This teaching appears throughout Buddhist texts and practice, from the Eightfold Path to the conduct of monastics, embodying Buddhism's pragmatic approach to liberation.
Source
Buddhist Teaching - Various Texts