A multi-physics-analysis-based topology optimization (TO) method is proposed to optimally design the internal partition layout of a muffler integrated with a thermoelectric generator (TEG). The basic equations governing the acoustical behavior, heat transfer, and fluid flow in the muffler are introduced, and their interaction is designated for exact numerical analysis in terms of acoustics, heat transfer, and fluid mechanics. To implement density-based TO, one design variable is assigned to each finite element in the design domain, and interpolation functions suitable for each physics phenomenon are employed. In the TO problem formulation, the sum of the squared acoustic pressures at the outlet of the muffler for multi-target frequencies is selected as an objective function to achieve broadband noise attenuation. The temperature of the TEG and the pressure drop are constrained for high energy recovery efficiency and fluid passage, respectively. The optimization problem formulated for the muffler design is solved for various design conditions. Optimal partition layouts are obtained depending on the location and length of the TEG, the upper limit value of the pressure drop, and the number of target frequencies in the same frequency band. The noise attenuation performances of each partition layout are compared, and their expected recovery energies are calculated. One optimal partition layout is discussed in terms of acoustics, heat transfer, and fluid mechanics. The numerical results strongly support the validity of our proposed method for the optimal design of a muffler integrated with a TEG.