We present the first direct lattice-QCD calculation of the $\mathrm{Bjorken}\text{\ensuremath{-}}x$ dependence of the valence quark distribution of the pion. Using large-momentum effective theory (LaMET), we calculate the boosted pion state with long Wilson link operators. After implementing the one-loop matching and meson mass corrections, our result at ${m}_{\ensuremath{\pi}}\ensuremath{\approx}310\text{ }\text{ }\mathrm{MeV}$ is in agreement with those extracted from experimental data as well as from the Dyson-Schwinger equation in the $\mathrm{small}\text{\ensuremath{-}}x$ region, but there is a sizeable discrepancy in the $\mathrm{large}\text{\ensuremath{-}}x$ region. This discrepancy provides a nice opportunity to systematically study and disentangle the artifacts in the LaMET approach, which will eventually help to discern various existing analyses in the literature.