A variable valve mechanism (20A, 20B, 20C) that changes a lift characteristic of a valve that opens or closes an intake port or an exhaust port of an engine, the variable valve mechanism comprising: a cam that rotates about a rotating shaft in association with rotation of a crank shaft of the engine; a swinging arm that is disposed between the cam and the valve and is pushed by the rotating cam to swing and push the valve by a first end portion of the swinging arm; a moving device that moves a second end portion of the swinging arm; a regulating member that is coupled to the first end portion of the swinging arm so as to be rotatable about a swinging shaft parallel to the rotating shaft and regulates displacement of the first end portion of the swinging arm relative to the valve when the second end portion of the swinging arm is moved by the moving device; and a connection member that connects the second end portion of the swinging arm to the moving device such that when the second end portion of the swinging arm is moved by the moving device, movement of the second end portion of the swinging arm about the swinging shaft is allowed, wherein an engaging pin extending in parallel with the rotating shaft of the cam is disposed at one of the second end portion of the swinging arm and the connection member; the other of the second end portion of the swinging arm and the connection member includes an insertion hole having an elongated hole shape into which the engaging pin is inserted; and when the second end portion of the swinging arm is moved by the moving device, the second end portion of the swinging arm moves about the swinging shaft while making the engaging pin slide in a longitudinal direction of the insertion hole; characterised in that a curvature radius of an outer peripheral surface portion of the engaging pin contacting an inner peripheral surface of the insertion hole when viewed from a direction in which the rotating shaft of the cam extends is larger than a length that is half a width of the insertion hole in a transverse direction. a cam that rotates about a rotating shaft in association with rotation of a crank shaft of the engine; a swinging arm that is disposed between the cam and the valve and is pushed by the rotating cam to swing and push the valve by a first end portion of the swinging arm; a moving device that moves a second end portion of the swinging arm; a regulating member that is coupled to the first end portion of the swinging arm so as to be rotatable about a swinging shaft parallel to the rotating shaft and regulates displacement of the first end portion of the swinging arm relative to the valve when the second end portion of the swinging arm is moved by the moving device; and a connection member that connects the second end portion of the swinging arm to the moving device such that when the second end portion of the swinging arm is moved by the moving device, movement of the second end portion of the swinging arm about the swinging shaft is allowed, wherein an engaging pin extending in parallel with the rotating shaft of the cam is disposed at one of the second end portion of the swinging arm and the connection member; the other of the second end portion of the swinging arm and the connection member includes an insertion hole having an elongated hole shape into which the engaging pin is inserted; and when the second end portion of the swinging arm is moved by the moving device, the second end portion of the swinging arm moves about the swinging shaft while making the engaging pin slide in a longitudinal direction of the insertion hole; characterised in that a curvature radius of an outer peripheral surface portion of the engaging pin contacting an inner peripheral surface of the insertion hole when viewed from a direction in which the rotating shaft of the cam extends is larger than a length that is half a width of the insertion hole in a transverse direction.