Inclusive electron scattering off the deuteron has been measured to extract the deuteron structure function F2 with the CEBAF Large Acceptance Spectrometer (CLAS) at the Thomas Jefferson National Accelerator Facility. The measurement covers the entire resonance region from the quasielastic peak up to the invariant mass of the final-state hadronic system W 2.7 GeV with four-momentum transfers Q2 from 0.4 to 6 (GeV/c)2. These data are complementary to previous measurements of the proton structure function F2 and cover a similar two-dimensional region of Q2 and Bjorken variable x. Determination of the deuteron F2 over a large x interval including the quasielastic peak as a function of Q2, together with the other world data, permit a direct evaluation of the structure function moments for the first time. By fitting the Q2 evolution of these moments with an OPE-based twist expansion we have obtained a separation of the leading twist and higher twist terms. The observed Q2 behavior of the higher twist contribution suggests a partial cancelation of different higher twists entering into the expansion with opposite signs. This cancelation, found also in the proton moments, is a manifestation of the "duality" phenomenon in the F2 structure function. © 2006 The American Physical Society.