A new method is proposed to unfold a neutron spectrum from measured activities with a guess shape for the spectrum. This method minimizes the weighted sum of the deviations from the guess shape and the measured activities and optimizes the scaling factor of the spectrum at the same time. Unlike most conventional methods, it does not need iterations, but instead directly obtains an unfolded spectrum by solving a positive definite matrix, whose size is equal to the number of the measured activities. Both analytical and numerical comparisons with some conventional methods are also presented.