A measurement of the W boson helicity is presented, where the W boson originates from the decay of a top quark produced in pp collisions. The event selection, optimized for reconstructing a single top quark in the final state, requires exactly one isolated lepton (muon or electron) and exactly two jets, one of which is likely to originate from the hadronization of a bottom quark. The analysis is performed using data recorded at a center-of-mass energy of 8 TeV with the CMS detector at the CERN LHC in 2012. The data sample corresponds to an integrated luminosity of 19.7 fb−1. The measured helicity fractions are FL= 0.298±0.028 (stat)±0.032(syst),F0= 0.720±0.039 (stat)±0.037(syst), and FR=−0.018±0.019 (stat)±0.011(syst). These results are used to set limits on the real part of the tWb anomalous couplings, gL and gR.