Thermoelectric generators (TEGs) are used to produce electricity utilizing two energy reservoirs. Despite the extensive research conducted on thermoelectric (TE) modules, their efficiencies are still low; therefore, any contribution to increase the efficiency of TE modules is valuable. It is known that the efficiency of individual TE modules depends on the temperature difference between their hot and cold faces. In practical applications employing an array of TE modules, the temperature distribution along the flow direction varies, which adversely affects system's efficiency. In this study, it is aimed to attain a homogeneous temperature distribution along a number of TE pieces by focusing on the structure of TEG heat exchanger. The proposed design includes an intermediate layer of liquid that plays a key role in keeping the temperature distribution homogeneous and at the desired temperature difference level. A three-dimensional (3D) computational fluid dynamics (CFD) model was developed for analyzing the circulation of liquid layer and the thermal behavior in the system. Results show decrease in temperature deviation both on cold and hot sides of TE modules, while the decrease is more on the latter. With more homogeneous temperature distribution along the TE surfaces, it is possible to tune the system to operate TE modules in their optimum temperature differences. It is illustrated that the heat transfer rate is increased by 11.71% and the electric power generation is enhanced by 19.95% with the proposed heat exchanger design. The consumption of pumping power has taken into account in the efficiency calculations.