Optimal heat transfer enhancement has been explored theoretically in plane Couette flow. The vector field (referred to as the ‘velocity’) to be optimised is time independent and divergence free, and temperature is determined in terms of the velocity as a solution to an advection-diffusion equation. The Prandtl number is set to unity, and consistent boundary conditions are imposed on the velocity and the temperature fields. The excess of a wall heat flux (or equivalently total scalar dissipation) over total energy dissipation is taken as an objective functional, and by using a variational method the Euler–Lagrange equations are derived, which are solved numerically to obtain the optimal states in the sense of maximisation of the functional. The laminar conductive field is an optimal state at low Reynolds number $Re\sim 10^{0}$. At higher Reynolds number $Re\sim 10^{1}$, however, the optimal state exhibits a streamwise-independent two-dimensional velocity field. The two-dimensional field consists of large-scale circulation rolls that play a role in heat transfer enhancement with respect to the conductive state as in thermal convection. A further increase of the Reynolds number leads to a three-dimensional optimal state at $Re\gtrsim 10^{2}$. In the three-dimensional velocity field there appear smaller-scale hierarchical quasi-streamwise vortex tubes near the walls in addition to the large-scale rolls. The streamwise vortices are tilted in the spanwise direction so that they may produce the anticyclonic vorticity antiparallel to the mean-shear vorticity, bringing about significant three-dimensionality. The isotherms wrapped around the tilted anticyclonic vortices undergo the cross-axial shear of the mean flow, so that the spacing of the wrapped isotherms is narrower and so the temperature gradient is steeper than those around a purely streamwise (two-dimensional) vortex tube, intensifying scalar dissipation and so a wall heat flux. Moreover, the tilted anticyclonic vortices induce the flow towards the wall to push low- (or high-) temperature fluids on the hot (or cold) wall, enhancing a wall heat flux. The optimised three-dimensional velocity fields achieve a much higher wall heat flux and much lower energy dissipation than those of plane Couette turbulence.