The invention relates to a hydraulic system with a priority function. According to the hydraulic system, a first main pump carries out the switchover of supplying oil to a second or first hydraulic actuator or simultaneously supplying oil to the first and second hydraulic actuators through a first main pump switching valve set, a second main pump carries out the switchover of supplying oil to the first hydraulic actuator or the second hydraulic actuator through a second main pump switching valve set, a fourth reversing valve is provided with a valve core displacement limit device, and the valve core displacement limit device comprises a valve core which is located in the movement direction of a valve core of the fourth reversing valve and a control oil port which is communicated with a first manual pilot hydraulic valve. The hydraulic system has the advantages that the problem of flow distribution in compound action can be solved, a machine of the system has the priority function, the performance of the collaborative action of two or more actuators can be improved, and the required elements are fewer, simple and reliable and are low in cost; by applying the system, an operator can complete expected operation in an easier manner, and meanwhile, the performance of separate operations or other complex operations cannot be affected.