Stock loans are loans collateralized by stocks. They are modern financial products designed for investors with large equity positions. Mathematically, stock loans can be regarded as American call options with a time-dependent strike price. This study is the first in the literature that considers the valuation of stock loans in a stochastic interest rate framework. Based on portfolio analysis, a partial differential equation (PDE) governing the value of stock loans is derived. A set of appropriate boundary conditions, particularly in the interest rate direction, are also proposed to close the pricing system. A sound justification is provided for the proposed boundary conditions mathematically as well as financially. To solve the proposed nonlinear PDE system, a predictor-corrector finite difference method is adopted. Moreover, an alternating direction implicit (ADI) method is used to improve the computational efficiency. Numerical results suggest that the current method is reliable and the stochastic interest rate leads to a higher optimal exercise price of the stock loan in comparison with that calculated from the Black-Scholes model.