This paper investigates the optimal guaranteed cost control of synchronization for uncertain stochastic complex networks with time-varying delays. The aim is to design state-feedback controllers such that the complex networks are globally asymptotical mean-square synchronization, and meanwhile the optimal upper bound of cost function is guaranteed. Based on Lyapunov–Krasovskii stability theory and Itô differential rule, sufficient condition for the existence of the optimal guaranteed cost control laws is given in terms of linear matrix inequalities (LMIs). A numerical example is given to illustrate the effectiveness of the proposed method.