With the continuous miniaturization and integration of electronic and optoelectronic nanodevices, Moore's Law faces huge challenges from the demands of devices with multifunctional and high-performance characteristics. With several recent reports of the successful synthesis of nanomaterials such as nanoparticles, quantum dots, nanowires, and two-dimensional layered materials, the utilization of such materials for the fabrication of electronic and optoelectronic nanodevices has demonstrated potential for realizing multifunctional and high-performance nanodevices in the future. In particular, owing to their excellent electrical, thermal, mechanical, and optical properties, atomically two-dimensional layered materials have emerged as the most promising materials for nanodevices to solve the bottleneck problems of traditional silicon-based devices. Two-dimensional semiconductor materials have been widely applied in many aspects of functional modules, including pn junctions, field effect transistors, rectifiers, photodetectors, and even solar cells. To provide a strong foundation for the development of high-performance and multifunctional nanodevices in the future, this review summarizes the recent advances in electronic and optoelectronic nanodevices based on novel two-dimensional semiconductor materials. We begin the review with a brief introduction of existing two-dimensional materials, including graphene, transition-metal dichalcogenide materials, black phosphorus, hexagonal boron nitride, and van der Waals heterostructures. The atom structure features, electronic and optical properties, and major applications in devices are discussed. The semiconductor materials are suitable for device channels, while graphene and hexagonal boron nitride can be used as electrodes, encapsulating materials, and components of van der Waals heterostructures for channel of field effect transistors. Next, we mainly discuss the advances in electronic and optoelectronic nanodevices based on transition-metal dichalcogenide materials, black phosphorus, and van der Waals heterostructures. In the context of electronic nanodevices, we introduce field effect transistors and other important functional devices, such as sensors, memristors, and integrated circuits. The mobility, on-off ratio, rectification ratio, and other properties of electronic devices are mentioned. In addition, we describe the potential applications of optoelectronic nanodevices for photodetectors, lasers, light-emitting diodes, photovoltaic devices, and so on. The metrics of devices performance such as responsivity, response time, and spectrum response range are compared. Finally, we summarize and compare the advantages and disadvantages of nanodevices based on different materials. Manufacturing comprehensive and high-performance nanodevices will be a promising direction in the future. In addition, the methods for improving the performance of devices are classified. This review will serve as an important reference for the development of future multifunctional and high-performance nanodevices.