A maintenance device of a fluid ejection head comprising: a cap (64 -64) that caps the nozzle face of the fluid ejection head; a cap unit on which a plurality of caps (64 -64) are mounted; a wiper (75 -75) that wipes the nozzle face; a suction pump that suctions ink from the cap (64 -64); a cap drive transfer mechanism that moves the cap (64 -64) relative to the nozzle face; a wiper-pump drive transfer mechanism that moves the wiper (75 -75) and drives the suction pump; and a drive switching mechanism having a lever (102a, 104a) configured to engage the cap unit, and to change driving by the wiper-pump drive transfer mechanism to drive the suction pump or to move the wiper (75 -75) according to the position of cap unit movement, the drive switching mechanism including a drive motor configured to rotate a drive shaft; characterized in that: a cam surface (105, 106) that engages the lever (102a, 104a) is formed on the cap unit, and the drive switching mechanism changes to driving either the suction pump or the wiper (75 -75) as a result of the lever (102a, 104a) and the cam surface (105, 106) engaging due to movement of the cap unit, a planetary gear speed reducer that has an internal gear and a planetary carrier, and speed reduces rotation of the drive shaft of the drive motor and causes the internal gear or planetary carrier to turn, and a latch mechanism (102, 104) configured to stop rotation of the internal gear or planetary carrier of the planetary gear speed reducer according to the position of cap movement; and is configured to change to driving the suction pump or the wiper (75 -75) by the lever (102a, 104a) engaging the cam surface (105, 106) and unlatching the latch mechanism (102, 104). a cap (64 -64) that caps the nozzle face of the fluid ejection head; a cap unit on which a plurality of caps (64 -64) are mounted; a wiper (75 -75) that wipes the nozzle face; a suction pump that suctions ink from the cap (64 -64); a cap drive transfer mechanism that moves the cap (64 -64) relative to the nozzle face; a wiper-pump drive transfer mechanism that moves the wiper (75 -75) and drives the suction pump; and a drive switching mechanism having a lever (102a, 104a) configured to engage the cap unit, and to change driving by the wiper-pump drive transfer mechanism to drive the suction pump or to move the wiper (75 -75) according to the position of cap unit movement, the drive switching mechanism including a drive motor configured to rotate a drive shaft; characterized in that: a cam surface (105, 106) that engages the lever (102a, 104a) is formed on the cap unit, and the drive switching mechanism changes to driving either the suction pump or the wiper (75 -75) as a result of the lever (102a, 104a) and the cam surface (105, 106) engaging due to movement of the cap unit, a planetary gear speed reducer that has an internal gear and a planetary carrier, and speed reduces rotation of the drive shaft of the drive motor and causes the internal gear or planetary carrier to turn, and a latch mechanism (102, 104) configured to stop rotation of the internal gear or planetary carrier of the planetary gear speed reducer according to the position of cap movement; and is configured to a cam surface (105, 106) that engages the lever (102a, 104a) is formed on the cap unit, and the drive switching mechanism changes to driving either the suction pump or the wiper (75 -75) as a result of the lever (102a, 104a) and the cam surface (105, 106) engaging due to movement of the cap unit, a planetary gear speed reducer that has an internal gear and a planetary carrier, and speed reduces rotation of the drive shaft of the drive motor and causes the internal gear or planetary carrier to turn, and a latch mechanism (102, 104) configured to stop rotation of the internal gear or planetary carrier of the planetary gear speed reducer according to the position of cap movement; and is configured to change to driving the suction pump or the wiper (75 -75) by the lever (102a, 104a) engaging the cam surface (105, 106) and unlatching the latch mechanism (102, 104).