Photodissociation by ultraviolet radiation is the key destruction pathway for CS in photon-dominated regions, such as diffuse clouds. However, the large uncertainties of photodissociation cross sections and rates of CS, resulting from a lack of both laboratory experiments and theoretical calculations, limit the accuracy of calculated abundances of S-bearing molecules by modern astrochemical models. Here we show a detailed ab initio study of CS photodissociation. Accurate potential energy curves of CS electronic states were obtained by choosing an active space CAS(8,10) in MRCI+Q/aug-cc-pV(5+d)Z calculation with additional diffuse functions, with a focus on the B and C 1Σ+ states. Cross sections for both direct photodissociation and predissociation from the vibronic ground state were calculated by applying the coupled-channel method. We found that the C - X (0 - 0) transition has extremely strong absorption due to a large transition dipole moment in the Franck-Condon region, and the upper state is resonant with several triplet states via spin-orbit couplings, resulting in predissociation to the main atomic products C (3 P) and S (1 D). Our new calculations show that the photodissociation rate under the standard interstellar radiation field is 2.9-10-9 s-1, with a 57% contribution from C - X (0 - 0) transition. This value is larger than that adopted by the Leiden photodissociation and photoionization database by a factor of 3.0. Our accurate ab initio calculations will allow more secure determination of S-bearing molecules in astrochemical models.