The invention discloses a dissipative soliton and soliton dual-wavelength laser based on a dispersion compensating fiber, which includes a laser diode, a beam combiner, a gain fiber, a coupling output element, a polarization-independent isolator, a polarization-maintaining fiber, and a carbon nanotube. Dispersion compensating fiber, polarizer, first polarization controller and second polarization controller; beam combiner, gain fiber, outcoupling element, polarization independent isolator, dispersion compensating fiber, polarization maintaining fiber, carbon nanotube, first The polarization controller, the polarizer and the second polarization controller are sequentially connected by optical fibers to form an all-fiber ring cavity, and the laser diode is connected to the beam combiner as the pumping light source of the laser. The invention can realize dual-wavelength laser output of traditional solitons and dissipative solitons in the 2 μm band, has a simpler structure and lower cost, and can simply and conveniently realize dual-wavelength output mode conversion.