An annihilation signal of dark matter is searched for from the central region of the Milky Way. Data acquired in dedicated ON/OFF observations of the Galactic center region with H.E.S.S. are analyzed for this purpose. No significant signal is found in a total of ∼9 h of ON/OFF observations. Upper limits on the velocity averaged cross section, <σv>, for the annihilation of dark matter particles with masses in the range of ∼300 GeV to ∼10 TeV are derived. In contrast to previous constraints derived from observations of the Galactic center region, the constraints that are derived here apply also under the assumption of a central core of constant dark matter density around the center of the Galaxy. Values of <σv> that are larger than 3⋅10−24cm3/s are excluded for dark matter particles with masses between ∼1 and ∼4 TeV at 95% CL if the radius of the central dark matter density core does not exceed 500 pc. This is the strongest constraint that is derived on <σv> for annihilating TeV mass dark matter without the assumption of a centrally cusped dark matter density distribution in the search region.