In a 21.3 MHz animal nuclear magnetic resonance (NMR) analyzer and imaging system, high uniformity of the static field B0 is a crucial prerequisite for obtaining high-quality images and detecting weak signals with short relaxation time. Using only passive shimming and gradient shimming, it is impossible to achieve perfect B0 uniformity. This paper presents an approach involving high-order active shimming for an NMR analyzer and an imaging magnet. The diameter spherical volume (DSV) of the magnet is only 60 mm. The spherical harmonic function is introduced to analyze the magnetic field and provide a foundation for active shimming. Eleven pairs of bi-planar active shim coils (X, Y, Z, XZ, YZ, Z2, X2 + Y2, X2 − Y2, Z3, Z4, Z5) were designed using the target field-and stream-function methods, and coils were manufactured with printed circuit board technology in this research. The magnetic field created by these electrified shim coils compensates effectively and accurately for the static magnetic field B0. The full width at half maximum of the resonance spectrum was used to measure the shimming effect. The results of practical shimming experiments in a 21.3 MHz animal NMR analyzer and imaging device showed that this new approach helps to reduce inhomogeneity from 24 ppm (24 × 10−6) to 0.39 ppm (0.39 × 10−6) over a 60 mm DSV, which meets the requirements of imaging and analytical practice.