This paper analyzes a condition-based maintenance (CBM) model for a system with two heterogeneous components in which degradation follows a bivariate gamma process. Unlike the traditional CBM formulation that assumes an infinite planning horizon, this paper evaluates the maintenance cost in a finite planning horizon, which is the practical case for most systems. In the proposed CBM policy, both components are periodically inspected and a preventive or corrective replacement might be carried out based on the state of degradation at inspection. The CBM model is formulated as a Markov decision process (MDP) and dynamic programming is used to compute the expected maintenance cost over a finite planning horizon.The expected maintenance cost is minimized with respect to the preventive replacement thresholds for the two components. Unlike an infinite-horizon CBM problem, which leads to a stationary maintenance policy, the optimal policy in the finite-horizon case turns out to be non-stationary in the sense that the optimal actions vary at each inspection epoch. A numerical example is presented to illustrate the proposed model and investigate the influence of economic dependency and correlation between the degradation processes on the optimal maintenance policy. Numerical results show that a higher dependence between the degradation processes actually reduces the maintenance cost, while a higher economic dependence leads to higher preventive replacement thresholds.