The optimization of shut-in-time in shale gas well is an important factor affecting the production of single well after volume fracturing. In this study, a new method for determining the optimal shut-in-time considering clay mineral content and ion diffusion concentration was proposed. First, a novel water spontaneous imbibition apparatus under the conditions of formation temperature and confining pressure was designed. Then, the water imbibition satuation of 15 shale samples from the Longmaxi Formation (LF) of the Sichuan Basin were measured to quantitatively evaluate the water imbibition ability and classify reservoir types. Finally, the salt ion concentration diffusion experiment was carried out to optimize the shut-in-time of different types of shale reservoirs. The experimental results shown that the clay mineral content was the key factor affecting water wettability of shale, the shale reservoirs can be divided into two types and the critical value of clay mineral content was about 40%. Based on the law of salt ion diffusion in shale, the initiation time of micro-fractures induced by shale hydration was about 10-15 days. Under the experimental conditions, the optimal shut-in time of type I shale reservoir and type II shale reservoir were about 20 days and 15 days respectively. The average daily gas production has increased from 15.6×104 m3/day to 30.2×104 m3/day. The study results can provide scientific basis for the optimization of flowback regime of shale gas resrvoirs.