Conversion of cellulose to the platform chemical, 5hydroxymethylfurfural (HMF), is of importance to the manufacture of a variety of bio-chemicals and biofuels. However, low mass and heat transfer between a solid catalyst and the cellulose particles severely hampers the efficiency of cellulose conversion. In effort to conquer the obstacle, a series of Ndoped mesoporous carbon materials (MCNs) were prepared and employed to catalyze cellulose to HMF by use of the temperature-responsive HCl-releasing effect of MCNs. In this way, acid-base dual catalytic environments can be constructed for efficient conversion of cellulose to HMF. MCN-2-DH⋅nHCl is capable of adsorbing chemically 1.07 mmol HCl/g at room temperature and releasing about 1.01 mmol HCl/g when being heated to 220°C. It is found that MCN-2-DH⋅nHCl is an excellent catalyst for cellulose conversion, yielding 52.6% HMF, 27.6% reducing sugars and 4.1% levulinic acid with a cellulose conversion of 96.4% after reacting at 220°C for 80 min. A total carbon yield of 84.3% can be achieved. Moreover, four times of recycling tests demonstrate that MCN-2-DH⋅nHCl possesses good temperature-responsive stability in aqueous solution.