The inner region of the Milky Way halo harbors a large amount of dark matter (DM). Given its proximity, it is one of the most promising targets to look for DM. We report on a search for the annihilations of DM particles using $gamma$-ray observations towards the inner 300 parsecs of the Milky Way, with the H.E.S.S. array of ground-based Cherenkov telescopes. The analysis is based on a 2D maximum likelihood method using Galactic center (GC) data accumulated by H.E.S.S. over the last 10 years (2004-2014), and does not show any significant $gamma$-ray signal above background. Assuming Einasto and Navarro-Frenk-White DM density profiles at the GC, we derive upper limits on the annihilation cross section $langle sigma vrangle$. These constraints are the strongest obtained so far in the TeV DM mass range and improve upon previous limits by a factor 5. For the Einasto profile, the constraints reach $langle sigma vrangle$ values of $rm 6times10^{-26} cm^3s^{-1}$ in the $W^+W^-$ channel for a DM particle mass of 1.5 TeV, and $rm 2times10^{-26} cm^3s^{-1}$ in the $tau^+tau^-$ channel for 1 TeV mass. For the first time, ground-based $gamma$-ray observations have reached sufficient sensitivity to probe $langle sigma vrangle$ values expected from the thermal relic density for TeV DM particles.