Nanosensor-based patient exhaled breath detection is a practical and effective way to detect lung cancer early. In this paper, a Ru-doped MoS2 monolayer (Ru-MoS2) is proposed as a promising novel biosensor based on first-principles theory for the detection of three typical early stage lung cancer exhaled volatile organic compounds, namely, C3H4O, C3H6O, and C5H8. Replacement of a S atom in the MoS2 monolayer with a Ru dopant atom to form a stable Ru-MoS2 monolayer with a binding energy of -4.78 eV is further demonstrated by the thermostability and chemical stability analysis as well as improving the adsorption performance of the system for three VOCs. The adsorption configuration structures, adsorption properties, and electronic behavior of the Ru-MoS2 monolayer are investigated by electron deformation density and density of states analysis to gain a comprehensive understanding of the physicochemical properties as sensing material. The results show that the adsorption energies of the Ru-MoS2 monolayer for C3H4O, C3H6O, and C5H8 are 3.42, -1.53, and -2.80 eV, respectively, all of which are chemisorption with excellent adsorption performance. The sensitivities for the three VOCs could be up to 1.09, 140.50, and 5.90, respectively, and the band structure and work function further elucidate the sensing mechanism of the Ru-MoS2 monolayer as a resistive gas sensor. The type and concentration of these exhaled breaths may reflect changes in the patient's physiological and biochemical status and may serve as a probe for the diagnosis of lung cancer. The results in this work could provide a guidance for researchers to explore the practical applications in the early diagnosis of lung cancer by gas sensors.