An image forming apparatus includes an apparatus body, a conveying mechanism that is provided in this apparatus body and conveys a sheet, a recording head that moves along a moving path orthogonal to a conveying direction of the sheet, ejects an ink to the sheet to print an image on the sheet, and, after the printing is finished, stands by in a first standby position on one end side of the moving path, and a CPU that moves the recording head that is on standby in the first standby position to an arbitrary position of the moving path.