Using trimethyl phosphate and calcium nitrate tetrahydrate as the calcium and phosphorus precursors, respectively, HA films were prepared layer by layer by a sol–gel method. The phase constitution, microstructure and calcium/phosphorus (Ca/P) molar ratio of the sol–gel films were studied by X-ray diffraction (XRD) and electronic probe microanalysis (EPMA). The results show that the sol–gel films have high crystallinity and are composed of HA and CaO phases, and the Ca/P ratio is slightly higher than the theoretical value in HA because of the loss of phosphorous element. Two typical cauliflower-like and lamellar structures were observed in the films. Cauliflower-like structure, which increases the biological reactivity of the implant surface towards natural bone, formed mainly at low drying temperature and high calcining temperature, while the lamellar structure formed when the drying temperature is high (500 °C or above).