Due to their relatively high compatibility with specific photonic structures, strong light-matter interactions and unique nonlinear optical response, two-dimensional (2D) materials, such as graphene and transition metal dichalcogenides, are attractive for ultrafast photonics applications. Here, we fabricate MoS2/graphene nanocomposites by a typical hydrothermal method. In addition, we systematically investigate their nonlinear optical responses. Our experiments indicate that the combined advantages of ultrafast relaxation, a broadband response from graphene, and the strong light-matter interaction from MoS2, can be integrated together by composition. The optical properties in terms of carrier relaxation dynamics, saturation intensity and modulation depth suggest great potential for the MoS2/graphene nanocomposites in photonics applications. We have further fabricated 2D nanocomposites based optical saturable absorbers and integrated them into a 1.5 μm Erbium-doped fiber laser to demonstrate Q-switched and mode-locked pulse generation. The fabrication of 2D nanocomposites assembled from different types of 2D materials, via this simple and scalable growth approach, paves the way for the formation and tuning of new 2D materials with desirable photonic properties and applications.