In the article is considered the problem of achieving the optimal duration of the working stroke of a diesel engine piston during the expansion process and obtaining the maximum efficiency coefficient (EC). For this purpose, a hypothesis was put forward about the pumping action of the piston on the flow of expanding gases during the power stroke of an diesel internal combustion engine (ICE) as the piston moves from upper dead point (UDP) to bottom dead point (BDP).At a certain moment of expansion, the rate of the flow of expanding gases turns out to be equal to the rate with which the same flow is slowed down by the moving piston.The equality of these rates leads to the formation of a flow break line and has a significant impact on the nature of the change in the polytropic exponent; the value of the exponent becomes equal to one: n = 1. This indicates that the optimum duration of the engine’s working stroke has been achieved and corresponds to the maximum power that can be removed during the diesel engine’s operating cycle. An experimental relation was obtained between the initial p1 and final p2 pressures in the cylinder during gas expansion with the gas flow rate and the rate of deceleration of this flow due to the pumping action of the piston. An equation for the continuity of gas flow has been compiled for the process of gas expansion in the cylinder of an ICE with closed gas exchange organs. Based on this equation, the numericalvalue of the acceleration of gravity in the cylinder of ICE is obtained: gф ≈ 8,7 м/с2 < g, which confirms the pumping action of the piston. A theoretical (and graphical) dependence of the polytropic process exponent on the flow rate of expanding gases is obtained. The dependence allows to calculate the polytropic exponent and establish the gas relaxation period, indicating the achievement of the optimal duration of the piston stroke.