In this article, we constructed a ring resonator using a polarization-maintaining hollow-core photonic bandgap fiber (HC-PBF) with a spatial coupling scheme, which includes a beam splitter and two pairs of even aspheric lenses. We developed a pioneering algorithm that can identify the polarization axis of the polarization-maintaining hollow-core fiber based on its cross-sectional image, enabling us to achieve an axis identification accuracy of 0.2°, and achieved a resonant curve with a finesse of 7. Without introducing additional polarization control components, we achieved the control of the polarization state inside the resonant ring, suppressing the secondary eigenstate of polarization successfully. This provides a new approach to polarization-maintaining hollow-core fiber coupling in a ring resonator.