An image forming apparatus comprising including an image carrier unit (40a-40d) that has an image carrier (1a-1d), a developing device (3a-3d) that has a developer carrier for supplying toner onto the image carrier (1a-1d) and is disposed adjacently to the image carrier unit (40a-40d), and a unit support frame that separately supports the image carrier unit (40a-40d) and the developing device (3a-3d) in a mountable/demountable manner, wherein the image forming apparatus comprises: a retainer that swings in a first direction, in which the image carrier unit (40a-40d) and the developing device (3a-3d) are mounted in the unit support frame, to perform positioning of the image carrier (1a-1d), and swings in a second direction, in which the image carrier unit (40a-40d) and the developing device (3a-3d) are drawn out from an image forming apparatus main body, to unlock a positioned state of the image carrier (1a-1d); and a developing device moving mechanism that associates with the swing of the retainer in the first direction to dispose the developing device (3a-3d) at a developing position where the developer carrier comes into contact with or comes close to the image carrier (1a-1d), and associates with the swing of the retainer in the second direction to dispose the developing device (3a-3d) at a separation position where the developer carrier separates the developing device (3a-3d) from the image carrier (1a-1d), wherein the developing device moving mechanism has a roller contact-separation cam that is disposed to oppose an end of a bottom surface of the developing device (3a-3d) supported by the unit support frame, and a gear mechanism (93, 95) that transmits swing force of the retainer to the roller contact-separation cam, the gear mechanism (93, 95) is composed of a first gear that is connected to a rotary shaft of the retainer to rotate in a direction identical to the swing direction of the retainer, and a second gear that is connected to a rotary shaft of the roller contact-separation cam to mesh with the first gear in a direction in which said rotary shafts (93a, 95a) are perpendicular to each other, and the retainer moves in the first direction or the second direction, whereby the end of the bottom surface of the developing device (3a-3d) supported by the unit support frame is moved up and down by the roller contact-separation cam, so that the developing device (3a-3d) is disposed at the developing positon or the separation position. a retainer that swings in a first direction, in which the image carrier unit (40a-40d) and the developing device (3a-3d) are mounted in the unit support frame, to perform positioning of the image carrier (1a-1d), and swings in a second direction, in which the image carrier unit (40a-40d) and the developing device (3a-3d) are drawn out from an image forming apparatus main body, to unlock a positioned state of the image carrier (1a-1d); and a developing device moving mechanism that associates with the swing of the retainer in the first direction to dispose the developing device (3a-3d) at a developing position where the developer carrier comes into contact with or comes close to the image carrier (1a-1d), and associates with the swing of the retainer in the second direction to dispose the developing device (3a-3d) at a separation position where the developer carrier separates the developing device (3a-3d) from the image carrier (1a-1d), wherein the developing device moving mechanism has a roller contact-separation cam that is disposed to oppose an end of a bottom surface of the developing device (3a-3d) supported by the unit support frame, and a gear mechanism (93, 95) that transmits swing force of the retainer to the roller contact-separation cam, the gear mechanism (93, 95) is composed of a first gear that is connected to a rotary shaft of the retainer to rotate in a direction identical to the swing direction of the retainer, and a second gear that is connected to a rotary shaft of the roller contact-separation cam to mesh with the first gear in a direction in which said rotary shafts (93a, 95a) are perpendicular to each other, and the retainer moves in the first direction or the second direction, whereby the end of the bottom surface of the developing device (3a-3d) supported by the unit support frame is moved up and down by the roller contact-separation cam, so that the developing device (3a-3d) is disposed at the developing positon or the separation position.