Flowerlike MoS2/CdS heterostructures are prepared by a simple hydrothermal method and they show higher photocatalytic activity under the excitation of visible light.