In cloud computing, service composition provides an appealing paradigm to compose existing single services into a powerful workflow. The critical issues in service composition is that service providers may lie about the service's cost and QoS for more profits. However, existing studies only address the issue of services' untruthful cost, none of the studies consider both the issue of untruthful cost and untruthful QoS. Thus, it is necessary to design an incentive mechanism to motivate service providers to offer services with the truthful cost and truthful QoS. To address the above challenging issues, we propose the strategy‐proof auction mechanism for service composition (SPASC), which can determine the winners and dynamically calculate the price of services. To the best of our knowledge, this is the first study to design an incentive mechanism to motivate service providers to offer services with the truthful cost and truthful QoS in this field. Furthermore, we propose an auction algorithm to implement the SPASC. Both theoretical proof and the extensively experimental results validate that SPASC achieves the truthfulness and individual rationality. At the same time, the experimental results also prove that this mechanism can motivate service providers to offer services with the truthful cost and truthful QoS.