By independently engineering strain and composition, this work demonstrates and investigates direct-band-gap emission in the midinfrared range from Ge1-xSnx layers grown on silicon. We extend the room-temperature emission wavelength above approximately 4.0 μm upon postgrowth strain relaxation in layers with uniform Sn content of 17 at.%. The fundamental mechanisms governing the optical emission are discussed based on temperature-dependent photoluminescence, absorption measurements, and theoretical simulations. Regardless of strain and composition, these analyses confirm that single-peak emission is always observed in the probed temperature range of 4-300 K, ruling out defect- and impurity-related emission. Moreover, carrier losses into thermally activated nonradiative recombination channels are found to be greatly minimized as a result of strain relaxation. Absorption measurements validate the direct band-gap in strained and relaxed samples at energies closely matching photoluminescence data. These results highlight the strong potential of Ge1-xSnx semiconductors as versatile building blocks for scalable, compact, and silicon-compatible midinfrared photonics and quantum optoelectronics.