The two‐dimensional (2D) models of breast cancer still exhibit a limited success. Whereas, three‐dimensional (3D) models provide more similar conditions to the tumor for growth of cancer cells. In this regard, a 3D in vivo model of breast cancer using 4 T1 cells and chitosan‐based thermosensitive hydrogel were designed. Chitosan/β‐glycerol phosphate hydrogel (Ch/β‐GP) was prepared with a final ratio of 2% and 10%. The hydrogel properties were examined by Fourier transformed infrared spectroscopy, MTT assay, pH, scanning electron microscopy, and biodegradability assay. 3D model of breast cancer was induced by injection of 1 × 106 4 T1 cells in 100 μl hydrogel and 2D model by injection of 1 × 106 4 T1 cells in 100 μl phosphate‐buffered saline (PBS) subcutaneously. After 3 weeks, induced tumors were evaluated by size and weight determination, ultrasound, hematoxylin‐ and eosin and Masson's trichrome staining and evaluating of cancer stem cells with CD44 and CD24 markers. The results showed that hydrogel with physiological pH had no cytotoxicity. In 3D model, tumor size and weight increased significantly (p ≤ .001) in comparison with 2D model. Histological and ultrasound analysis showed that 3D tumor model was more similar to breast cancer. Expression of CD44 and CD24 markers in the 3D model was more than 2D model (p ≤ .001). This 3D in vivo model of breast cancer mimicked native tumor and showed malignant tissue properties. Therefore, the use of such models can be effective in various cancer studies, especially in the field of cancer stem cells.