The invention has for its object to provide an optical unit and an endoscope, in which a voice coil motor is used for retractable movement of a movable part and which is reduced in terms of both size and weight. The optical unit is characterized by including a tubular fixed part 2 with a given axis C as center, a front frame part 4 that holds a front lens group Gf in place and is attached to an object side of the fixed part 2 with the axis C as center, a back frame part 5 that holds a back lens group Gb in place and is attached to an image side of the fixed part 2 with the axis C as center, a movable part 3 that holds a moving lens group Gv in place and is located inside the fixed part 2 with the axis C as center, and a voice coil motor 10 that is capable of moving the movable part 3 relatively with respect to the fixed part 2in a direction of the axis C by a coil 11 located in the fixed part 2 and a magnet 12 located in the movable part 3 and magnetically polarized in a direction orthogonal to the axis C, wherein at least a part of the movable part 3 is included in a portion of the front frame part 4 projected in the axis C direction.