As an industrial energy plant, the whole parts of the sunflower crop were used for biofuel production through a biorefinery approach. Two scenarios were suggested for this biorefinery, i.e., using all parts of the crop separately and the whole residues as a mixture. The oil extracted from seeds was applied for biodiesel production through transesterification using a 6:1 methanol to oil molar ratio with 0.7% catalyst at 50 °C for 65 min. The process resulted in a 96.2% biodiesel yield with a heating value of 41.6 MJ/kg, corresponding to 84 kg biodiesel per ton of sunflower crop and 108.8 L gasoline-equivalent. Three physiochemical pretreatments were employed for structural modification of lignocellulosic residues, and the solid and liquid phases of the pretreatments were anaerobically digested for biomethane production. The effects of hot water (180 °C, 1 h), concentrated phosphoric acid (50 °C, 1 h, 85%), and sodium carbonate (142 °C, 18 min, 4%) pretreatments on composition, crystallinity, morphology, and biogas production of solid samples were evaluated. The highest methane yield of solid fractions was obtained from samples treated with phosphoric acid, and the seed cake showed the maximum yield of 342.7 N mL/g VS among all parts. Furthermore, the liquid phase of the hot water and alkaline pretreatments produced a high amount of biomethane, contrary to the acidic pretreatment. The overall mass balance showed that 11095.0 MJ/t energy (containing 346.7 L gasoline energy) was produced through the optimum biorefinery, where the untreated mixture and seed cake were used for biomethane production and the extracted oil for biodiesel production.