Hemicellulose extraction from lignocellulosic biomasses has gained interest over the years, and hydrothermal treatment is one of the most common methods employed for this purpose. This work aimed to deeply study hazelnut (Corylus avellana L.) shells as a new source of dietary fibre, evaluating the effect of hydrothermal treatment temperatures on the type and structure of fibre extracted, but also on the formation of side-products derived from lignocellulose degradation. Different process temperatures led to diverse polysaccharides in the hydrothermal extract. Pectin was identified for the first time in hazelnut shells when experimenting with extraction at 125 °C, whereas at 150 °C a heterogeneous mixture of pectin, xylan, and xylo-oligosaccharides was present. The highest yield in terms of total fibre was gained at 150 and 175 °C, and then decreased again at 200 °C. Finally, more than 500 compounds from different chemical classes were putatively identified and they appeared to be present in the extracted fibre with a different distribution and relative amount, depending on the heat treatment severity. A generally high content of phenols, phenyls, oligosaccharides, dehydro-sugars, and furans was observed. Modulation of the hydrothermal treatment temperature allows fibre extracts with very different compositions, and therefore different potential end uses, to be obtained from hazelnut shells. A sequential temperature-based fractionation approach, as a function of the severity of the extraction parameters, can also be considered. Nevertheless, the study of the side-compounds formed from lignocellulosic matrix degradation, as a function of the applied temperature, needs to be fully addressed for a safe introduction of the fibre extract within the food chain. © 2023 The Authors. Journal of The Science of Food and Agriculture published by John Wiley & Sons Ltd on behalf of Society of Chemical Industry.