Recently, the cloud computing technology and privacy protection have been rapidly developed, resulting in a reversible data hiding scheme in the encrypted image (RDHEI) that attracts people's eyes. RDHEI is a novel scheme that can hide the secret data in an encrypted image. The encrypted image can be successfully extracted from the secret data and be completely recovered back to the original image. This study proposes a novel RDHEI scheme based on Shamir's secret sharing scheme and a constructed polynomial. In the data hiding algorithm, a polynomial function to conceal the secret data and pixels into the coefficients of the constructed polynomial is proposed. Then, the secret sharing scheme is applied to generate the encrypted sharing images. Experimental results demonstrate that the proposed scheme has outperformance in terms of embedding capacity than that of other state-of-the-art methods.