The invention relates to a hydraulic system of a dual-purpose excavation and shoveling machine. The hydraulic system comprises a hydraulic oil tank, oil supply systems, an oil return system, an amplitude changing system, a telescopic system, a rotation system, an air conditioner system and a supporting system, wherein the amplitude changing system, the telescopic system, the rotation system, the air conditioner system and the supporting system are connected with the hydraulic oil tank through the oil supply systems and the oil return system, and respective hydraulic circuits are formed. Compared with the prior art, the hydraulic system has the advantages that switching between soil shoveling operation and excavation operation can be conducted, and the equipment investment cost is greatly saved; the output power at the position of a claw is high, and the claw is applicable to construction of harder ground conditions; the rotation angle of a rotation center is larger than 360 degrees, the working area is large, and the working efficiency is high; the safety is higher when high-difficulty operation is conducted; an air conditioner is additionally arranged in an operating room; a cooling system is arranged on an oil return pipeline, and the service life of the machine is prolonged; the system is simple in structure and reliable in operation, and convenient to use, the balance weight does not need to be added in the reverse direction of the working end, and the total weight of the machine is reduced.