The Hard X-ray Imager (HXI) onboard Hitomi (ASTRO-H) is an imaging spectrometer covering hard xray energies of 5 to 80 keV. Combined with the Hard X-ray Telescope, it enables imaging spectroscopy with an angular resolution of 1 0 .7 half-power diameter, in a field of view of 9 0 × 9 0 . The main imager is composed of four layers of Si detectors and one layer of CdTe detector, stacked to cover a wide energy band up to 80 keV, surrounded by an active shield made of Bi 4 Ge 3 O 12 scintillator to reduce the background. The HXI started observations 12 days before the Hitomi loss and successfully obtained data from G21.5-0.9, Crab, and blank sky. Utilizing these data, we calibrate the detector response and study properties of in-orbit background. The observed Crab spectra agree well with a powerlaw model convolved with the detector response, within 5% accuracy. We find that albedo electrons in specified orbit strongly affect the background of the Si top layer and establish a screening method to reduce it. The background level over the full field of view after all the processing and screening is as low as the preflight requirement of 1 − 3 × 10 −4 counts s −1 cm −2 keV −1 . © The Authors. Published by SPIE under a Creative Commons Attribution 3.0 Unported License. Distribution or reproduction of this work in whole or in part requires full attribution of the original publication, including its DOI.