Coarse-graining (CG) of complex molecules is a method to reach time scales that would be impossible to access through brute force molecular simulations. In this paper, we formulate a coarse-grained model for complex molecules using first principles caculations that ensures energy conservation. Each molecule is described in a coarse way by a thermal blob characterized by the position and momentum of the center of mass of the molecule, together with its internal energy as an additional degree of freedom. This level of description gives rise to an entropy-based framework instead of the usual one based on the configurational free energy (i.e. potential of mean force). The resulting dynamic equations, which account for an appropriate description of heat transfer at the coarse-grained level, have the structure of the dissipative particle dynamics with energy conservation (DPDE) model but with a clear microscopic underpinning. Under suitable approximations, we provide explicit microscopic expressions for each component (entropy, mean force, friction and conductivity coefficients) appearing in the coarse-grained model. These quantities can be computed directly using MD simulations. The proposed non-isothermal coarse-grained model is thermodynamically consistent and opens up a first principles CG strategy for the study of energy transport issues that are not accessible using current isothermal models.