The total share of intermittent renewable electricity is increasing, intensifying the need for power balancing in future electricity systems. Demand-orientated combined heat and power (CHP) production from biogas has potential for this purpose. An agricultural biogas plant, using cattle manure and sugar beet for biogas and CHP production was analysed here. The model Dynamic Biogas plant Model (DyBiM) was developed and connected to the Anaerobic Digestion Model No. 1 (ADM1). Flexible scenarios were simulated and compared against a reference scenario with continuous production, in order to evaluate the technical requirements and economic implications of demand-orientated production. The study was set in Swedish conditions regarding electricity and heat price and the flexibility approaches assessed were increased CHP and gas storage capacity and feeding management. The results showed that larger gas storage capacity was needed for demand-orientated CHP production, but that feeding management reduced the storage requirement because of fast biogas production response to feeding. Income from 2 electricity increased by 10%, applying simple electricity production strategies to a doubled CHP capacity. However, as a result of the currently low Swedish diurnal electricity price variation and lack of subsidies for demand-orientated electricity production, the increase in income was too low to cover the investment costs. Nevertheless, DyBiM proved to be a useful modelling tool for assessing the economic outcome of different flexibility scenarios for demand-orientated CHP production.