The sharing economy has changed people’s lives. These changes have accelerated the pace of life and improved the quality of life, but have also had some negative effects. For example, in China, in the supply chain of the takeout delivery platform, the service deliverer often violates traffic rules to shorten the delivery time. This phenomenon has aroused widespread concern in society. From the perspective of sustainable operation of platform enterprises and reducing social risks, this issue is worthy of in-depth study. First, this study analyses the optimal decision-making about pricing and service efforts, then discusses the supply chain coordination mechanism under a revenue-sharing contract, and finds that the platform’s service level is related to the efforts of deliverers and the elasticity of demand/service. However, under a traditional revenue-sharing contract, the economic returns are not enough to motivate deliverers to avoid violations of traffic regulations; When the increase of cost caused by the improvement of service level is not fully covered by the revenue sharing from the platform, they have a strong incentive to break the rules even if the optimal coordination can be achieved in the supply chain. Second, this study reconstructs the revenue-sharing contract by adding social responsibility to the objective function of the platform enterprises and designs contingent rewards to regulate behaviours of service deliverers. The results indicate that when the contingent reward factor reaches a certain level, the optimal effort of the service deliverers is constrained within a reasonable range, which can to some extent reduce the occurrence of illegal behaviour. Our findings offer fresh insights on coordination of supply chain in the sharing economy, identify new direction for future research on CSR, and provide managers of platform enterprises with suggestions for regulating the behaviour of partners and balance the economic and social benefits.