To address a bi-objective optimization configuration problem of battery energy storage system (BESS) in distributed energy system (DES) considering energy loss and economy, a perturbation and observation approach (P&O) is proposed in this article. First, in a DES, the configuration model of BESS is established. Then, a novel way is designed that transforming a bi-objective optimization problem into a single objective optimization problem with variable conditions. And the P&O process of the proposed method is presented. Finally, in a simulation case, compared with a single optimization objective of energy loss or economy, the P&O method improves 5.71-fold or 2.94-fold in each direction, respectively and effectively balances the contradiction between them. In addition, with the efficiency and electricity cost of BESS increasing, the rated capacity of BESS changes by approximately 10%. And the location is a key factor affecting the configuration scheme of BESS in DES.