Integrated biorefineries are processing facilities which convert biomass into value-added fuels and chemicals. From a commercial perspective, recent lignocellulosic biorefinerinig ventures have been fraught with technological and market uncertainties often leading to considerable financial losses for value chain actors. The objective of this work is to develop a comprehensive optimization framework for sustainable design of biorefineries. A structural approach is utilized for planning the production capacity, simulation of the process in detail, and optimizing the operating condition of the plant. A stochastic linear programming model is developed for strategic optimization under market uncertainty. Results from strategic model are sent to the lower level of optimization model in which operating conditions of the plant are optimized through an iterative process simulation and stochastic optimization. To demonstrate the effectiveness of the proposed approach, a hypothetical lignocellulosic biorefinery is considered as a case study. The results prove the efficiency of the proposed approach, and provide a quantitative analysis to determine the optimal design in the face of uncertainty.