The invention provides a tunable random fiber laser based on two gratings. The tunable random fiber laser comprises a laser source, a 1*2 optical fiber coupler, a first random optical pulse generator, a first electro-optical modulator, a first optical isolator, a first erbium-doped optical fiber amplifier, a single side band modulator, a microwave source, a first polarization controller, a second optical isolator, a second random optical pulse generator, a second electro-optical modulator, a third optical isolator, a delay optical fiber, a second erbium-doped fiber amplifier, a second polarization controller, a polarization beam combiner, a fourth optical isolator, an erbium-doped fiber, a polarization maintaining fiber, a random Brillouin dynamic grating, a pumping laser source, a wavelength division multiplexer, a high-reflection fiber bragg grating and a tuning device. According to the invention, the problem that random laser lasing can only be realized by means of a long-distance grating in the prior art is solved, and the laser capable of outputting tunable random laser without a high-power pumping source is provided.