5-hydroxymethyl furfural (HMF) is an important biomass-derived material for alkane bio-oil production. HMF is currently produced from edible glucose and fructose. Until recently, some researchers successfully applied ionic liquids to convert cellulose, a type of inedible biomass, to HMF. However, ionic liquids usually are toxic and/or require sophisticated skills to prepare. It would be more cost-effective if water can be employed as the reaction media. This paper studied hydrothermal conversion of cellulose to HMF under acidic, neutral and alkaline conditions. The results showed that, at 275–320°C and the reaction residence time of 0–30 min, the order of HMF yields followed the order of acidic, neutral and alkaline conditions. In terms of HMF purity, the order changed to neutral, acidic and alkaline conditions. Moreover, high temperatures (>300°C) and long reaction residence time had negative effects on the HMF yields in acidic and neutral solutions, mostly because of the promoted decomposition and the polymerization of HMF to levulinic acid and char, respectively. Therefore, the conditions of acidic aqueous solutions, medium range temperatures and short reaction residence time were recommended for hydrothermal conversion of cellulose to HMF. On the other hand, this study revealed that cellulose can also be converted to HMF under alkaline conditions. With the carboxylic acids produced from cellulose under alkaline conditions, the initial alkaline hydrothermal condition can gradually become acidic.