Coherent light sources in the visible range are playing important roles in our daily life and modern technology, since about 50% of the capability of the our human brains is devoted to processing visual information. Visible lasers can be achieved by nonlinear optical process of infrared lasers and direct lasing of gain materials, and the latter has advantages in the aspects of compactness, efficiency, simplicity, etc. However, due to lack of visible optical modulators, the directly generated visible lasers with only a gain material are constrained in continuous-wave operation. Here, we demonstrated the fabrication of a visible optical modulator and pulsed visible lasers based on atomic-layer molybdenum sulfide (MoS 2), a ultrathin two-dimensional material with about 9–10 layers. By employing the nonlinear absorption of the modulator, the pulsed orange, red and deep red lasers were directly generated. Besides, the present atomic-layer MoS 2 optical modulator has broadband modulating properties and advantages in the simple preparation process. The present results experimentally verify the theoretical prediction for the low-dimensional optoelectronic modulating devices in the visible wavelength region and may open an attractive avenue for removing a stumbling block for the further development of pulsed visible lasers.