Groundwater temperature is an important water quality parameter that affects species distributions in subsurface and surface environments. To investigate the response of subsurface temperature to atmospheric climate change, an analytical solution is derived for a one-dimensional, transient conduction–advection equation and verified with numerical methods using the finite element code SUTRA. The solution can be directly applied to forward model the impact of future climate change on subsurface temperature profiles or inversely applied to produce a surface temperature history from measured borehole profiles. The initial conditions are represented using superimposed linear and exponential functions, and the boundary condition is expressed as an exponential function. This solution expands on a classic solution in which the initial and boundary conditions were restricted to linear functions. The exponential functions allow more flexibility in matching climate model projections (boundary conditions) and measured temperature–depth profiles (initial conditions). For example, measured borehole temperature data from the Sendai Plain and Tokyo, Japan, were used to demonstrate the improved accuracy of the exponential function for replicating temperature–depth profiles. Also, the improved accuracy of the exponential boundary condition was demonstrated using air temperature anomaly data from the Intergovernmental Panel on Climate Change. These air temperature anomalies were then used to forward model the effect of surficial thermal perturbations in subsurface environments with significant groundwater flow. The simulation results indicate that recharge can accelerate shallow subsurface warming, whereas upward groundwater discharge can enhance deeper subsurface warming. Additionally, the simulation results demonstrate that future groundwater temperatures obtained from the proposed analytical solution can deviate significantly from those produced with the classic solution. Copyright © 2013 John Wiley & Sons, Ltd.