A variable valve mechanism of an internal combustion engine, comprising: a rocker arm that is driven by a cam so as to swing to drive a valve; a switching pin that is attached to the rocker arm so as to be shifted between a first position and a second position; a shift device that shifts the switching pin from the first position to the second position; and a return spring that returns the switching pin from the second position to the first position, wherein a drive state of the valve is switched by shifting the switching pin, the rocker arm is formed to have such a dimension that one end of the switching pin is exposed while projecting outward from the rocker arm, and the return spring is externally fitted to the one end of the switching pin so as to be exposed outside the rocker arm, wherein a push-out member that makes contact with the cam is attached to the rocker arm, the push-out member is pushed out toward a rotation center side of the cam from the rocker arm when the switching pin is shifted from one of the first position and the second position to the other position, and the push-out member is retracted into the rocker arm when the switching pin is shifted from the other position to the one position, at a time of retraction when the push-out member is retracted, a normal state is established, in which the valve is closed in a base circle section where a base circle (12a, 13a) of the cam acts and the valve is opened in a nose section where a nose (12b, 13b) of the cam acts; and at a time of push-out when the push-out member is pushed out, a constantly-opened state is established, in which the valve is opened in both the base circle section and the nose section, characterized in that the time of retraction includes a time other than a startup of the internal combustion engine, and the time of push-out includes the startup of the internal combustion engine. a rocker arm that is driven by a cam so as to swing to drive a valve; a switching pin that is attached to the rocker arm so as to be shifted between a first position and a second position; a shift device that shifts the switching pin from the first position to the second position; and a return spring that returns the switching pin from the second position to the first position, wherein a drive state of the valve is switched by shifting the switching pin, the rocker arm is formed to have such a dimension that one end of the switching pin is exposed while projecting outward from the rocker arm, and the return spring is externally fitted to the one end of the switching pin so as to be exposed outside the rocker arm, wherein a push-out member that makes contact with the cam is attached to the rocker arm, the push-out member is pushed out toward a rotation center side of the cam from the rocker arm when the switching pin is shifted from one of the first position and the second position to the other position, and the push-out member is retracted into the rocker arm when the switching pin is shifted from the other position to the one position, at a time of retraction when the push-out member is retracted, a normal state is established, in which the valve is closed in a base circle section where a base circle (12a, 13a) of the cam acts and the valve is opened in a nose section where a nose (12b, 13b) of the cam acts; and at a time of push-out when the push-out member is pushed out, a constantly-opened state is established, in which the valve is opened in both the base circle section and the nose section, characterized in that the time of retraction includes a time other than a startup of the internal combustion engine, and the time of push-out includes the startup of the internal combustion engine.