Abstract In order to achieve more flexible and intelligent service composition, the context information should be fully utilized. Although many context-related approaches have been proposed to support the dynamic service composition, the context representation and management remains an open problem. In this paper, we propose a multi-granularity context model which effectively exploits the relationships among different context attributes, together with the corresponding multi-granularity context management approach to strengthen the flexibility and intelligence of dynamic service composition. The proposed multi-granularity context model makes it possible to achieve dynamic service composition through logical reasoning. A case study together with comparison analysis are presented to illustrate the validity of our approach.