Nowadays, the development of advanced and innovative intelligent control techniques for energy management in buildings is a key issue within the smart grid topic. A nonlinear economic model predictive control (EMPC) scheme, based on the branch-and-bound tree search used as optimization algorithm for solving the nonconvex optimization problem is proposed in this paper. A simulation using the nonlinear model-based controller to control the temperature levels of an intelligent office building (PowerFlexHouse) is addressed. Its performance is compared with a linear model-based controller. The nonlinear controller is shown very reliable keeping the comfort levels in the two considered seasons and shifting the load away from peak hours in order to achieve the desired flexible electricity consumption.