The purpose of this paper is to develop a general approach to valuing commodity-linked bonds (CLBs) based on the Heath-Jarrow-Morton (HJM) framework. The model deals with four dimensions of uncertainty: prices of the underlying commodity, the value of firm that issues bonds, interest rates, and convenience yields. A mathematical formula for the price of a commodity-linked bond is derived. The previous results in Black and Scholes (1973), Merton (1973), Schwartz (1982), and Atta-Mensah (1992) can be obtained by specifying appropriate restrictions in the general model. Using similar assumptions, as found in Miura and Yamauchi (1998) and Carr (1987), more reasonable results can be obtained through the application of the present model.