The first measurement of the jet mass mjet of top quark jets produced in tt¯ events from pp collisions at s√=8 TeV is reported for the jet with the largest transverse momentum pT in highly boosted hadronic top quark decays. The data sample, collected with the CMS detector, corresponds to an integrated luminosity of 19.7fb−1. The measurement is performed in the lepton+jets channel in which the products of the semileptonic decay t→bW with W→ℓν where ℓ is an electron or muon, are used to select tt¯ events with large Lorentz boosts. The products of the fully hadronic decay t→bW with W→qq¯¯¯′ are reconstructed using a single Cambridge–Aachen jet with distance parameter R=1.2, and pT>400 GeV. The tt¯ cross section as a function of mjet is unfolded at the particle level and is used to test the modelling of highly boosted top quark production. The peak position of the mjet distribution is sensitive to the top quark mass mt, and the data are used to extract a value of mt to assess this sensitivity.