The synthesis of multiple narrow optical spectral lines, precisely and independently tuned across the near- to mid-infrared region, is a pivotal research area that enables selective and real-time detection of trace gas species within complex gas mixtures. However, existing methods for developing such light sources suffer from limited flexibility and very low pulse energy, particularly in the mid-infrared domain. Here, we introduce a concept that is based on the combination of an appropriate design of near-infrared fiber laser pump and cascaded configuration of gas-filled anti-resonant hollow-core fiber technology. This concept enables the synthesis of multiple independently tunable spectral lines, with >1 μJ high pulse energies and a few nanoseconds pulse width in the near- and mid-infrared regions. The number and wavelengths of the generated spectral lines can be dynamically reconfigured. A proof-of-concept laser beam synthesized of two narrow spectral lines at 3.99 µm and 4.25 µm wavelengths is demonstrated and combined with photoacoustic modality for real-time SO2 and CO2 detection. The proposed concept also constitutes a promising way for infrared multispectral microscopic imaging.