Beamforming based on microphone array measurements is a popular method for identifying sound sources. However, beamforming has many limitations that limit their precision. These limitations are addressed in research. To separate the contributions which come from two sides of the microphone array more accurately, an innovative beamforming method based on a double-layer microphone array, called functional generalized inverse beamforming (FGIB), is proposed to improve beamforming performance. This method, which involves the use of a priori beamforming regularization matrix and a matrix function to redefine the inverse problem, is combined with the advantages of both generalized inverse beamforming (GIB) and functional beamforming. Compared with GIB, with reduced iterations, the computational efficiency of FGIB is greatly improved. The dynamic range of the proposed method can be modestly improved as order v increases. Furthermore, the sidelobes gradually disappear and the mainlobes become narrower. Both simulations and experiments have shown that the sources are correctly located and separated. The proposed FGIB demonstrates the good performance when compared to other beamforming methods in terms of resolution and sidelobes level.