During recent years increased attention has been given to second-generation wood-based bioenergy. The carbon stored in the forest is highest when there is little or no harvest from the forest. Increasing the harvest from a forest, in order to produce more bioenergy, may thus conflict with the direct benefit of the forest as a carbon sink. We analyze this conflict using a simple model where bioenergy and fossil energy are perfect substitutes. Our analysis shows how the social optimum will depend on the social cost of carbon, and how the social optimum may be obtained by suitable taxes and subsidies.