He was elected to the Federal Council on 18 July 1940 and handed over office on 31 December 1947. He was affiliated to the Free Democratic Party (FDP/PRD).
Between 1921 and 1940, he worked in the management of Ludwig von Rollschen Eisenwerke. In 1922, he presided the parliament of the Canton of Solothurn. Between 1930 and 1940, Stampfli was a member of the Swiss National Council.
Georg Hafner: Bundesrat Walther Stampfli (1884-1965). Leiter der Kriegwirtschaft im Zweiten Weltkrieg. Bundesrätlicher Vater der AHV. Dietschi, Olten 1986