A space-borne hard X-ray collimator,comprising 91 pairs of grids,has been developed for the Hard X-ray Imager(HXI).The HXI is one of the three scientific instruments onboard the first Chinese solar mission:the Advanced Space-based Solar Observatory(ASO-S).The HXI collimator(HXI-C)is a spatial modulation X-ray telescope designed to observe hard X-rays emitted by energetic electrons in solar flares.This paper presents the detailed design of the HXI-C for the qualification model that will be inherited by the flight model.Series tests on the HXI-C qualification model are reported to verify the ability of the HXI-C to survive the launch and to operate normally in on-orbit environments.Furthermore,results of the X-ray beam test for the HXI-C are presented to indirectly identify the working performance of the HXI-C.