The results of digital simulation of the lithium peroxide formation during the lithium–oxygen battery discharge are presented. The active layer of the positive electrode is described by the simplest monoporous model of a porous medium (a set of sinuous homogeneous non-intersecting pores of constant radius). The influence of the active layer thickness on the positive electrode dimensional characteristics during the galvanostatic discharge of the lithium–oxygen battery is investigated. The dependence of the discharge capacity on the positive electrode active layer thickness was shown to have an extreme character. With increase in the positive electrode active layer thickness the initial section of the increase in the calculated capacity is replaced by a section of a decrease in the capacity. It was found that the process of lithium peroxide molecules’ generation mainly occurs within a narrow region where the pore mouths are in contact with the gas phase. The calculations show that the optimal thickness of the positive electrode active layer is very small (of the order of tens of microns).