We developed a prototype of a hard X-ray coded aperture imaging telescope, aiming at space X-ray astronomical research. In the paper we first presented the mask coding technology, the optical design and the imaging reconstruction method, and then introduce the development of the prototype telescope. The position sensitive detector is 5mm thick CdZnTe with pixel size of 1.5mm x 1.5mm, and total area of 50mm x 50mm. The mask elements are made of alloy of Tungsten and Iron, with thickness of 0.7mm and element size of 3.2mm x 3.2mm, respectively. As shown by a laboratorial test, the energy resolution (Delta E/E, @ 59.54keV) of this telescope is 11.6%, the source locating accuracy is about 0.12 degrees, and the angular resolution is better than 0.42 degrees.