The invention discloses an anti-impact electromagnetic unloading valve of a straight-arm lorry-mounted crane. A first oil hole, a second oil hole, a third oil hole, a first oil return hole and a second oil return hole are formed in the surface of a valve body; the valve body is internally provided with a front valve oil hole, a control oil hole and a rear valve oil hole; a first one-way valve, a second one-way valve and a third one-way valve are communicated with the first oil hole, the second oil hole and the third oil hole respectively unidirectionally to reach the oil way of the front valve oil hole; the first one-way valve, the second one-way valve and the third one-way valve jointly form a one-way valve group; two oil ways are formed between the front valve oil hole and the rear valve oil hole, as for the main oil way, the front valve oil hole is communicated with the rear valve oil hole through a hydraulic control one-way valve, and as for the control oil way, the front valve oil hole is communicated with the rear valve oil hole through a first damping hole, a magnetic exchange valve, the control oil hole and a second damping hole, and the rear valve oil hole is directly communicated with the first oil return hole and the second oil return hole. The anti-impact electromagnetic unloading valve has the beneficial effects of small boundary dimension, high flow capacity, low cost, small reversing impact, low energy consumption and high reliability.