A method for controlling an engine, comprising a step of: A. allowing a compression self-ignition combustion under an air-fuel ratio leaner than a stoichiometric air-fuel ratio to be performed at least in a partial-load range of the engine, B. wherein, under a condition that an engine speed varies at a same load in an engine operating region of the compression self-ignition combustion, a compression end temperature (Tx), which is an in-cylinder temperature just before an air-fuel mixture self-ignites, is controlled to be raised higher in a higher engine speed side than in a lower engine speed side, C. wherein the control for raising the compression end temperature (Tx) includes a control for raising a compression initial temperature which is an in-cylinder temperature at a start timing of a compression stroke, and wherein, the compression initial temperature is controlled to be raised higher in the higher engine speed side than in the lower engine speed side, characterized in that D. the control for raising the compression initial temperature includes a control for performing internal EGR for causing burned gas to remain in a cylinder, the internal EGR being performed on a lower engine load side than a given engine load in the engine operating region of the compression self-ignition combustion; E. the method further comprises a step of raising a compression initial pressure which is an in-cylinder pressure at a start timing of a compression stroke, according to a rise in the engine load, by means of supercharging, on a higher engine load side than the given engine load in the engine operating region of the compression self-ignition combustion; and F. under a condition that an engine speed varies at a same load in an engine operating region where the compression self-ignition combustion is performed with the internal EGR, an internal EGR amount is controlled to be increased in a higher engine speed side than in a lower engine speed side, and a control for supercharging fresh air is performed so as to compensate for lowering of a density of fresh air due to a rise in temperature resulting from the internal EGR. A. allowing a compression self-ignition combustion under an air-fuel ratio leaner than a stoichiometric air-fuel ratio to be performed at least in a partial-load range of the engine, B. wherein, under a condition that an engine speed varies at a same load in an engine operating region of the compression self-ignition combustion, a compression end temperature (Tx), which is an in-cylinder temperature just before an air-fuel mixture self-ignites, is controlled to be raised higher in a higher engine speed side than in a lower engine speed side, C. wherein the control for raising the compression end temperature (Tx) includes a control for raising a compression initial temperature which is an in-cylinder temperature at a start timing of a compression stroke, and wherein, the compression initial temperature is controlled to be raised higher in the higher engine speed side than in the lower engine speed side, characterized in that D. the control for raising the compression initial temperature includes a control for performing internal EGR for causing burned gas to remain in a cylinder, the internal EGR being performed on a lower engine load side than a given engine load in the engine operating region of the compression self-ignition combustion; E. the method further comprises a step of raising a compression initial pressure which is an in-cylinder pressure at a start timing of a compression stroke, according to a rise in the engine load, by means of supercharging, on a higher engine load side than the given engine load in the engine operating region of the compression self-ignition combustion; and F. under a condition that an engine speed varies at a same load in an engine operating region where the compression self-ignition combustion is performed with the internal EGR, an internal EGR amount is controlled to be increased in a higher engine speed side than in a lower engine speed side, and a control for supercharging fresh air is performed so as to compensate for lowering of a density of fresh air due to a rise in temperature resulting from the internal EGR.