A formulation of density functional theory (DFT) is constructed as an application of the method of maximum entropy for an inhomogeneous fluid in thermal equilibrium. The use of entropy as a systematic method to generate optimal approximations is extended from the classical to the quantum domain. This process introduces a family of trial density operators that are parameterized by the particle density. The optimal density operator is that which maximizes the quantum entropy relative to the exact canonical density operator. This approach reproduces the variational principle of DFT and allows a simple proof of the Hohenberg–Kohn theorem at finite temperature. Finally, as an illustration, we discuss the Kohn–Sham approximation scheme at finite temperature.