A semi-analytical approach is developed for modeling 3D heat transfer in sparsely fractured rocks with prescribed water flow and heat source. The governing differential equations are formulated, and the corresponding integral equations over the fracture faces and the distributed heat source are established in the Laplace transformed domain using the Green function method with local systems of coordinates. The algebraic equations of the Laplace transformed temperatures of water in the fractures are formed by dividing the integrals into elemental ones; in particular, the fracture faces are discretized into rectangular elements, over which the integrations are carried out either analytically for singular integrals when the base point is involved or numerically for regular integrals when otherwise. The solutions of the algebraic equations are inverted numerically to obtain the real-time temperatures of water in the fractures, which may be employed to calculate the temperatures at prescribed locations of the rock matrix. Three example calculations are presented to illustrate the workability of the developed approach. The calculations found that water flux in the fractures may decrease the rate of temperature rise in regions close to the distributed heat source and increase the rate of temperature rise in regions downstream away from the distributed heat source and that the temperature distribution and evolvement in a sparsely fractured rock mass may be significantly influenced by water flow exchange at intersection of fractures. Copyright © 2014 John Wiley & Sons, Ltd.