An apparatus for testing spray and combustion performance of an internal-combustion engine based on a rapid compression-expansion machine, wherein the apparatus comprises a driving mechanism, a transmission mechanism, an engine cylinder, an air intake system and an exhaust system, the engine cylinder comprises a piston (8), a cylinder block (9), a dual-fuel cylinder head and a multi-injector assembly, wherein the piston (8) is disposed in the cylinder block (9), the driving mechanism is connected with the piston (8) through the transmission mechanism and drives the piston (8) to linearly move back and forth along a vertical direction of the cylinder block (9), the dual-fuel cylinder head is connected to an upper part of the cylinder block (9), a multi-fuel injection assembly comprises a plurality of injectors, the plurality of injectors are of the same type and are all disposed on the dual-fuel cylinder head, the upper part of the cylinder block (9) is transversely provided with an air intake (21) and an exhaust port (26), the air intake (21) and the exhaust port (26) are perpendicular to a moving direction of the piston (8), the air intake system comprises an air intake pipeline, an external air tank (11), a nitrogen bottle group (14), an air tank (15), a pressure stabilizing tank (17) and a gas control system (20), the air intake pipeline is connected with the air intake (21), the external air tank (11) is connected with the air intake pipeline through a first solenoid valve (12), the gas control system (20) is connected with the air intake pipeline through a fifth solenoid valve (19), the pressure stabilizing tank (17) is connected with the air intake pipeline through a fourth solenoid valve (18), the nitrogen bottle group (14) is connected with the air intake pipeline through a second solenoid valve (13), the air tank (15) is connected with the air intake pipeline through a third solenoid valve (16), and the exhaust port (26) is connected with the exhaust system.