We have measured directly the residual energy of cosmic ray muons crossing the MACRO detector at the Gran Sasso Laboratory. For this measurement we have used a transition radiation detector consisting of three identical modules, each of about 12 m(2) area, operating in the energy region from 100 GeV to 1 TeV, The results presented here were obtained with the first module collecting data for more than two years. The average single muon energy is found to be 320 +/- 4 (stat.) +/- 11 (syst.) GeV in the rock depth range 3000-6500 hg/cm(2). The results are in agreement with calculations of the energy loss of muons in the rock above the detector. (C) 1999 Elsevier Science B.V