A proposed model is used to account for both the recovery rate and regime-switching uncertainties for pricing credit-risky bonds. A two-factor hazard rate model (TFHRM) is also considered, where the dynamics of both instantaneous forward rates and asset values are modeled using Markov-modulated geometric Brownian motions (MMGBMs). Moreover, a macroeconomic factor is incorporated into the MMGBMs. The model complexity is resolved through the introduction of an endogenous intensity function and a recovery rate under the TFHRM. A semi-closed-form solution for pricing defaultable bonds is derived along with a pricing formula for credit spread. A credit cycle is constructed to reflect changes in industry characteristics and macroeconomic factors. The empirical study demonstrates that the inclusion of a stochastic recovery rate increases the model’s pricing accuracy, and the results indicate a close interaction among business cycles, recovery rates, and credit ratings.