The Landau-de Gennes theory provides a successful macroscopic description of nematics. Cornerstone of this theory is a phenomenological expression for the effective free energy as a function of the orientational order parameter. Here, we show how such a macroscopic Landau-de Gennes free energy can systematically be constructed for a microscopic model of liquid crystals formed by interacting mesogens. For the specific example of the Gay-Berne model, we obtain an enhanced free energy that reduces to the familiar Landau-de Gennes expression in the limit of weak ordering. By carefully separating energetic and entropic contributions to the free energy, our approach reconciles the two traditional views on the isotropic-nematic transition of Maier-Saupe and Onsager, attributing the driving mechanism to attractive interactions and entropic effects, respectively.