A medical device 1 of the invention includes: a treatment instrument 40 including a treatment instrument insertion portion 42 to be inserted into a treatment instrument channel 41a a detecting portion 72 for detecting advancing/retreating moving amount of the treatment instrument insertion portion a treatment portion operating device 50 for advancing/retreating the operation wire 43 to operate the treatment portion 41 an operation instructing portion 33 for instructing operation of the treatment portion and a control device 20 for judging a state of the treatment instrument insertion portion and driving the treatment portion operating device by a moving amount obtained by correcting an advancing/retreating amount of the operation wire, based on a detection result from the detecting portion according to an instruction from the operation instructing portion.