This paper presents a high-precision optical inspection system designed for small-diameter ultra-deep-hole measurement. A reverse-tracing flux matching (RTFM) method is introduced for quantitative optical design, and an ultra-slim, long-working-length imaging system is developed featuring high transmittance and near-diffraction-limited performance. To address tangential distortion in inner-wall imaging, a bidirectional ray-tracing calibration (BRTC) method is proposed, enabling accurate panoramic unwrapping on non-planar surfaces. Optical simulations demonstrate high imaging quality, low tolerance sensitivity, and strong thermal robustness. A prototype endoscope (UHVE) was fabricated, and experimental evaluations, including distortion calibration, magnification measurement, and full-field MTF testing, confirm a practical spatial resolution better than 10 μm over 4-8 mm bore sizes. Panoramic stitching accuracy was validated using a reference CMM, achieving lateral and axial errors of 4.873 μm and 10.190 μm, respectively. The proposed UHVE system provides a compact and reliable solution for high-precision inner-wall inspection in small-aperture ultra-deep-hole applications.