A random inhomogeneous sound propagation medium is considered in acoustic imaging, which is modeled by a random function of the spatial medium. The inhomogeneity of the sound propagation environment can cause large errors in the modeling and measurement of acoustic imaging. Since the wave equation contains random variables, Green’s function no longer has a specific analytical solution. The main work of this paper is as follows: (1) The acoustic inverse problem is considered in the inhomogeneous sound field, which is expressed according to predefined statistical information; (2) Karhunen-Loève expansion is used to simplify the proposed inhomogeneous propagation sound field, and the numerical solution of Green’s function is used instead of the original analytical solution; (3) A dual-driven (including data-driven and knowledge-driven) algorithm based on the Bayesian framework is developed to achieve acoustic imaging, which is implemented through the joint estimation of the aperture function and the sparse prior. Finally, the proposed model and algorithm are verified by a numerical simulation. The proposed algorithm is compared with conventional beamforming in terms of localization accuracy and sound power quantization. The simulation results show that the inhomogeneous sound field can be represented by a small number of random variables, and the proposed dual-drive algorithm can accurately achieve acoustic imaging in the inhomogeneous propagation environment.