Provided are an optical unit and an endoscope that can enhance the airtightness between a holding tube and a cover glass without a joining member flowing into a distal end surface of an optical lens while maintaining the attachment accuracy of the cover glass and can secure a fine diameter and a wide angle visual field. A spacer 144 is disposed between a cover glass position restricting part 136 of a holding tube 132 of an optical unit 10 and a cover glass 108. The position of the cover glass 108 in an optical axis is restricted by the cover glass position restricting part 136 via a spacer 144. An external diameter D1 of a first end surface 144A of the spacer 144 is smaller than an internal diameter D2 of a cover glass fixing part 134 of the holding tube 132. A solder pool part is provided in a region 156, which is surrounded by a side surface 144C of the spacer 144, the cover glass fixing part 134, and the cover glass position restricting part 136.