In the framework of light-cone QCD sum rules, we study the valence quark distribution function q(xB) of a pion for moderate xB. The sum rule with the leading twist-2 wave function gives q(xB) = ϕπ(xB). Twist-4 wave functions give about 30 % for xB ∼ 0.5. It is shown that QCD sum rule predictions, with the asymptotic pion wave function, are in good agreement with experimental data. We found that a two-hump profile for the twist-2 wave function leads to a valence quark disribution function that contradicts experimental data.