Maxwell's first derivation of the equilibrium distribution function for a dilute gas is generalized in the spirit of the nonextensive q-statistics proposed by Tsallis. As an application, the q-Doppler broadening of spectral lines due to the random thermal motion of the radiating atoms is derived.