High frequency ultrasonic imaging provides clinicians with high-resolution diagnostic images and more accurate measurement results. The technique is now widely used in ophthalmology, dermatology, and small animal imaging. However, since ultrasonic attenuation in tissue increases rapidly with increasing frequency, the depth of detection of high frequency ultrasound in tissue is limited to a few millimeters. In this paper, a novel method of using Golay-coded excitation as a replacement for conventional single-pulse excitation in high frequency ultrasound biomicroscopy was proposed, and real-time imaging was realized. While maintaining the transmission voltage and image resolution unchanged, the detection depth can be effectively improved. The ultrasonic transmission frequency is 30 MHz and the transmission voltage is ± 60 V p-p. In this study, 4-bit, 8-bit, and 16-bit coding sequences and decoding compression were used. To verify the effectiveness of the coding sequence in real-time imaging of ultrasound biomicroscopy, we designed a 10-μm diameter line target echo experiment, an ultrasound phantom experiment, and an in vitro porcine eye experiment. The experimental results show that the code/decode method of signal processing can not only maintain a resolution consistent with that of single-pulse transmission, but can also improve the detection depth and signal-to-noise ratio.