PROBLEM TO BE SOLVED: To provide a medical device which is provided with a function other than an imaging function, has a swallowable size, and can be used at a section having many curves within a body cavity.SOLUTION: In a capsule endoscope 100 having plural capsules introduced into a body cavity, the capsules comprise a capsule 1 having an imaging function, and a capsule 3 having a moving function. Electric magnets 15 and 35 and rods 25 and 26 magnetically separate or couple the capsules.SELECTED DRAWING: Figure 2