An internal combustion engine comprising: a variable valve mechanism including a plurality of cams (Ca, Cb, Cc) used to drive an exhaust valve; and an electronic control unit configured to (a) select a use cam, which is a cam (Ca, Cb, Cc) used to drive the exhaust valve, from the plurality of cams (Ca, Cb, Cc), and (b) determine whether a switching abnormality of the use cam is present on the basis of a locus of an in-cylinder pressure changing rate in a predetermined period, the predetermined period being a period in which the exhaust valve is opened,. characterized in that the variable valve mechanism is configured to switch the cams (Ca, Cb, Cc) such that a plurality of modes are performed, and the electronic control unit is configured to set the predetermined period to at least one period of a period in which the exhaust valve is opened by switching of the use cam and a period in which the exhaust valve is not opened by the switching of the use cam, when the switching of the use cam is normally performed depending on the modes, and in that the electronic control unit is configured to determine whether the switching abnormality is present on the basis of a predetermined item of the locus, and the predetermined item includes at least one of (i) presence of an inflection point obtained by operating of the exhaust valve, (ii) absence of the inflection point, (iii) value of the inflection point, and (iv) generating timing of the inflection point. a variable valve mechanism including a plurality of cams (Ca, Cb, Cc) used to drive an exhaust valve; and an electronic control unit configured to (a) select a use cam, which is a cam (Ca, Cb, Cc) used to drive the exhaust valve, from the plurality of cams (Ca, Cb, Cc), and (b) determine whether a switching abnormality of the use cam is present on the basis of a locus of an in-cylinder pressure changing rate in a predetermined period, the predetermined period being a period in which the exhaust valve is opened,. (a) select a use cam, which is a cam (Ca, Cb, Cc) used to drive the exhaust valve, from the plurality of cams (Ca, Cb, Cc), and (b) determine whether a switching abnormality of the use cam is present on the basis of a locus of an in-cylinder pressure changing rate in a predetermined period, the predetermined period being a period in which the exhaust valve is opened,. characterized in that the variable valve mechanism is configured to switch the cams (Ca, Cb, Cc) such that a plurality of modes are performed, and the electronic control unit is configured to set the predetermined period to at least one period of a period in which the exhaust valve is opened by switching of the use cam and a period in which the exhaust valve is not opened by the switching of the use cam, when the switching of the use cam is normally performed depending on the modes, and in that the electronic control unit is configured to determine whether the switching abnormality is present on the basis of a predetermined item of the locus, and the predetermined item includes at least one of (i) presence of an inflection point obtained by operating of the exhaust valve, (ii) absence of the inflection point, (iii) value of the inflection point, and (iv) generating timing of the inflection point. (i) presence of an inflection point obtained by operating of the exhaust valve, (ii) absence of the inflection point, (iii) value of the inflection point, and (iv) generating timing of the inflection point.