Both the goal of energy independence and the desire to lower greenhouse gas emission have triggered the search for alternate energy sources. For second generation biofuel production, a key question is which form of industrial organization should be adopted in order to stimulate stable feedstock production. Using a two-stage optimal control framework, we analyze the optimal form of industrial organization should be adopted where technology innovation is endogenous and biorefinery faces credit constraint. Our results show that, under certain assumptions, it is optimal to adopt vertical integration in the beginning and move to contract farming later. Moreover, the tighter credit constraint that a biorefinery faces, the sooner the biorefinery would adopt contract farming.