Topology optimization (TO) is a dependable approach to obtain innovative designs with improved performance. This study presents a TO method based on the adjoint lattice Boltzmann method (ALBM) and the level set method which is developed for both one‐way coupled and two‐way coupled convective heat transfer problems. The adjoint lattice Boltzmann model for fully coupled natural convection system is derived, and the coupled solution strategy is applied in the ALBM. The forward model is validated by the finite element simulation, while the adjoint model and the sensitivity expression is validated by a finite difference check, and the whole TO method is validated by a typical pure fluid flow optimization problem given in the literature. The validated TO method is then applied to enhance the heat transfer of forced convection in a two‐dimensional open chamber, and the Pareto frontier of the bi‐objective optimization is further presented and the effects of the blockages at the inlet and outlet on the overall performance are revealed. Finally, the two‐dimensional natural convection process in a closed cavity is optimized, in which the effective heat transfer coefficient can be increased to 3.96 ∼ 6.11 times of that without the optimized design when the Grashof number ranges from 1.7 to 4.2 × 105. Moreover, effects of Grashof number, porosity limitation and solid thermal diffusivity on the optimization results are analyzed in detail. Physically reasonable designs are obtained for both forced convection and natural convection systems under various parameter settings, demonstrating the effectiveness and robustness of the presented TO method.