In this study, nanocomposite scaffolds of hydroxyapatite (HA)/polycaprolactone (PCL)/gelatin (Gel) with varying amounts of HA (42-52 wt. %), PCL (42-52 wt. %), and Gel (6 wt. %) were 3D printed. Subsequently, a scaffold with optimal mechanical properties was utilized as a carrier for doxorubicin (DOX) in the treatment of bone cancer. For this purpose, HA nanoparticles were first synthesized by the hydrothermal conversion of Acropora coral and characterized by using different techniques. Also, a compression test was performed to investigate the mechanical properties of the fabricated scaffolds. The mineralization of the optimal scaffold was determined by immersing it in simulated body fluid (SBF) solution for 28 days, and the biocompatibility was investigated by seeding MG-63 osteoblast-like cells on it after 1-7 days. The obtained results showed that the average size of the synthesized HA particles was about 80 nm. The compressive modulus and strength of the scaffold with 47 wt. % HA was reported to be 0.29 GPa and 9.9 MPa, respectively, which was in the range of trabecular bones. In addition, the scaffold surface was entirely coated with an apatite layer after 28 days of soaking in SBF. Also, the efficiency and loading percentage of DOX were obtained as 30.8 and 1.6%, respectively. The drug release behavior was stable for 14 days. Cytotoxicity and adhesion evaluations showed that the fabricated scaffold had no negative effects on the viability of MG-63 cells and led to their proliferation during the investigated period. From these results, it can be concluded that the HA/PCL/Gel scaffold prepared in this study, in addition to its drug release capability, has good bioactivity, mechanical properties, and biocompatibility, and can be considered a suitable option for bone tumor treatment.