Balls To The WallThe phrase balls to the wall, meaning an all-out effort, comes from the world of aviation. On an airplane, the handles controlling the throttle and the fuel mixture are often topped with ball-shaped grips, referred to by pilots as (what else?) "balls." Pushing the balls forward, close to the front wall of the cockpit increases the amount of fuel going to the engines and results in the highest possible speed.
The earliest written citation is from 1966-67, appearing in Harvey's Air War:
You know what happened on that first Doomsday Mission (as the boys call a big balls-to-the-wall raid) against Hanoi oil.
Several Korean War-era veterans have written me noting their use of the term during their service. The phrase may very well date to this earlier war, although we have no written evidence for it.
There are two common misconceptions about the phrase. The first is that it is a reference to a part of the male anatomy.
The second is that it arose in railroad work. A speed governor on train engines would have round, metal weights at the end of arms. As the speed increased, the spinning balls would rise--being perpendicular to the walls at maximum speed. But there is no evidence to support this story. No use of the phrase is known to exist prior to the mid-1960s, and all the early cites are from military aviation.
(Source: Historical Dictionary of American Slang)