Hyaluronic acid (HAc) hydrogel exhibits excellent biocompatibility, but it has limited biomedical application due to its poor biomechanical properties as well as too-fast enzymatic degradation. In this study, we have developed an in situ precipitation process for the fabrication of a HAc-calcium phosphate nanocomposite hydrogel, after the formation of the glycidyl methacrylate-conjugated HAc (GMHA) hydrogels via photo-cross-linking, to improve the mechanical and biological properties under physiological conditions. In particular, our process facilitates the rapid incorporation of calcium phosphate (CaP) nanoparticles of uniform size and with minimal agglomeration into a polymer matrix, homogeneously. Compared with pure HAc, the nanocomposite hydrogels exhibit improved mechanical behavior. Specifically, the shear modulus is improved by a factor of 4. The biostability of the nanocomposite hydrogel was also significantly improved compared with that of pure HAc hydrogels under both in vitro and in vivo conditions.