We propose a bilevel mixed-integer nonlinear programming (MINLP) model for the optimal investment of biorefinery facilities considering non-cooperative farmers and biofuel consumers. Interactions among the supply chain players are captured through a single-leader-multiple-follower Stackelberg game under the generalized Nash equilibrium assumption. Given a three-echelon superstructure, the lead biofuel company in the middle echelon first optimizes its design and operational decisions, including facility location, sizing, and technology selection, material input/output and price setting. The following farmers and biofuel consumers in the upstream and downstream then optimize their transactions with the biofuel company to maximize their individual profits. Novel solution strategies are also proposed to solve the proposed bilevel MINLP efficiently. A county-level case study is presented to demonstrate the application of our model, as well as the performance of the proposed solution strategy.