Anaerobic digestion (AD) is a biotechnological process, in which microorganisms degrade organic matter under anaerobic conditions to produce biogas. It has long been known that the two main species (acidogenic and methanogenic) in the community of microorganisms in AD differ in many aspects and the optimal conditions for their growth and development are different. Therefore, in AD in a single bioreactor (BR) (single-phase process), the optimal conditions are selected taking into account the slow-growing methanogens at the expense of fast-growing acidogens, which affects the efficiency of the whole process. This has led in recent years to the development of two-stage AD (TSAD), in which processes are divided into a cascade of two separate BRs. It is known that this division of the processes into two consecutive BRs leads to significantly higher energy yields for the two-phase system (H2 + CH4), compared to the traditional single-stage CH4 production process. In our previous studies different mathematical models of the TSAD have been developed. It was shown that in both BRs the input-output characteristics have a clear maximum, which allows the yields to increase significantly if operations are provided around the maximum points. However, in order to maintain the sustainability of the biogas plants work, it is necessary to introduce automatic control with sophisticated extremum seeking control (ESC) algorithms. This paper presents the pioneering research on ESC of AD process with production of hydrogen and methane. This research has been realized by the Department of Biotechnology at The Stephan Angeloff Institute of Microbiology (SAIM) and the French-Chinese Laboratory on Automatic Control and Signal Processing (LaFCAS), in collaboration with the Laboratory of Signals and Systems (L2S) at the French National Center of Scientific Research CNRS.