TiO2–graphene oxide nanocomposites have been fabricated by the sol–gel technique for degradation of a typical cationic dye solution. The prepared photocatalysts were characterized by X‐ray diffraction, Fourier transform infrared spectroscopy, thermogravimetric‐differential analyses, Brunauer–Emmett–Teller surface area measurement, and scanning and transmission electron microscopy. In addition, the photocatalytic activities of samples were evaluated by degradation of methylene blue aqueous solution under the sunlight irradiation. The change in color of solution was evaluated by the UV–vis spectroscopy, and the maximum photocatalytic decoloration (94%) was achieved within 60 min, which exceeded that of pure anatase under the same conditions. The results show that the nanocomposite containing 9.0 wt% of graphene oxide has the superior photocatalytic performance to either single‐phase anatase or other composites containing different amounts of graphene oxide. The experimental degradation data obtained from the batch tests were analyzed by a modified kinetic model, which predicted the performance with higher regression coefficients and lower relative errors. The distribution of TiO2 nanoparticles (<20 nm) on graphene oxide sheets is proposed to be the efficient factor in the homogeneous degradation of dye which can concomitantly improve the photocatalytic activity.