The divergence-free time-independent velocity vector field has been determined so as to maximise heat transfer between two parallel plates of a constant temperature difference under the constraint of fixed total enstrophy. The present variational problem is the same as that first formulated by Hassanzadeh et al. (2014); however, a search range of optimal states has been extended to a three-dimensional velocity field. The scaling of the Nusselt number N u with the Péclet number P e (i.e., the square root of the non-dimensionalised enstrophy with thermal diffusion timescale), N u ∼ P e 2/3 , has been found in the threedimensional optimal states, corresponding to the asymptotic scaling with the Rayleigh number Ra, N u ∼ Ra 1/2 , in extremely-high-Ra convective turbulence, and thus to the Taylor energy dissipation law in high-Reynolds-number turbulence. At P e ∼ 10 0 , a twodimensional array of large-scale convection rolls provides maximal heat transfer. A threedimensional optimal solution emerges from bifurcation on the two-dimensional solution branch at higher P e. At P e 10 3 , the optimised velocity fields consist of convection cells with hierarchical self-similar vortical structures, and the temperature fields exhibit a logarithmic mean profile near the walls.