Pure and doped hydroxyapatite (HA) nanocrystalline powders (Ca10-xMgx(PO4)6OH2) were synthesized using sol-gel process. For this, calcium nitrate tetrahydrate, magnesium nitrate hexahydrate, and phosphorous pentoxide were used as precursors for Ca, Mg, and P, respectively. Calculated amounts of magnesium ions (Mg+2) especially from 0 to 10% (molar ratio) were incorporated as dopant into the calcium sol solution. The structure and morphology of the gels obtained after mixing the phosphorous and (calcium + magnesium) sol solution were different, and their condensations in time depend on the quantities of magnesium added. The several powders resulting from the gels dried and sintered at 500°C for 1 h were characterized by thermogravimetry (TG), Fourier transform infrared spectroscopy (FTIR), X-ray diffraction (XRD), and inductively coupled plasma (ICP). Additionally, their agglomeration, morphology, and particle size were investigated using scanning electron microscopy (SEM) and transmission electron microscopy (TEM). The specific surface area of each sample was measured by the Brunauer–Emmett–Teller (BET) gas adsorption technique. The results of XRD, FTIR, and ICP values ranged between 0.45 and 2.11 mg/L indicated that the magnesium added in the calcium solution was incorporated in the lattice structure of HA so prepared, while those obtained by SEM and TEM confirmed the influence of Mg on their morphology (needle and irregular shape) and crystallite size, which is about 30–60 nm. The as-prepared powders had a specific surface area ranged between 6.37 and 27.60 m2/g.