Demand response (DR) has become an effective and critical method for obtaining better savings on energy consumption and cost. Buildings are the potential demand response resource since they contribute nearly 50% of the electricity usage. Currently, more DR applications for buildings were rule-based or utilized a simplified physical model. These methods may not fully embody the interaction among various features in the building. Based on the tree model, this paper presents a novel model based control with a random forest (MBCRF) learning algorithm for the demand response of commercial buildings. The baseline load of demand response and optimal control strategies are solved to respond to the DR request signals during peak load periods. Energy cost saving of the building is achieved and occupant’s thermal comfort is guaranteed simultaneously. A linguistic if-then rules-based optimal feature selection framework is also utilized to redefine the training and test set. Numerical testing results of the Pennsylvania-Jersey-Maryland (PJM) electricity market and Research and Support Facility (RSF) building show that the load forecasting error is as low as 1.28%. The peak load reduction is up to 40 kW, which achieves a 15% curtailment and outperforms rule-based DR by 5.6%.