We propose and demonstrate a comb multi-wavelength, nanosecond rectangular pulse, passively mode-locked Erbium-doped fiber (EDF) laser. A section of un-pumped EDF had been employed to optimize the multi-wavelength pulses for the first time to the best of our knowledge. The un-pumped EDF absorbs the unwanted the short-wavelength lasing and optimizes the gain, therefore allowing for the enhancement of the long-wavelength lasing. Because of the gain competition effect in the un-pumped EDF, the output wavelength line number of the fiber laser can be significantly increased from three wavelengths to twenty lasing wavelengths. The mode-locked pulse has a rectangular temporal profile with pump power dependent pulse duration. Experimental results illustrate that the fiber laser has a good stability at room temperature. This work provides a new configuration for the design of multi-wavelength, rectangular nanosecond pulse that may fit for specific applications.