The first measurement of the jet mass m jet of top quark jets produced in t t ¯ events from pp collisions at s=8TeV is reported for the jet with the largest transverse momentum p T 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 → b W with W → ℓν where ℓ is an electron or muon, are used to select t t ¯ events with large Lorentz boosts. The products of the fully hadronic decay t → b W with W → q q ¯ ′ are reconstructed using a single Cambridge–Aachen jet with distance parameter R= 1.2 , and p T > 400 GeV. The t t ¯ cross section as a function of m jet is unfolded at the particle level and is used to test the modelling of highly boosted top quark production. The peak position of the m jet distribution is sensitive to the top quark mass m t , and the data are used to extract a value of m t to assess this sensitivity.