In this study, the operation of millisecond-scale non-sputtering discharge in hydrogen and helium has been examined. The pulse duration was around 1 ms, and the maximum pulse power was around 80 kW. The plasma parameters were monitored with an electric probe. The optical emission spectra from plasma were recorded synchronously with each pulse by AvaSpec ULS2048 spectrometer. The use of the pulsed non-sputtering modes in hydrogen and helium enables achieving non-constricted plasmas with high density and no traces of optical emission lines corresponding to the species of cathode or anode materials.