Urea is a commonly used protein denaturant, and it is of great interest to determine its interaction with various protein groups to elucidate the molecular basis of its effect on protein stability. Using the Trp-cage miniprotein as a model system, we report what we believe to be the first computation of changes in the preferential interaction coefficient of the protein upon urea denaturation from molecular-dynamics simulations and examine the contributions from the backbone and the side-chain groups. The preferential interaction is obtained from reversible folding/unfolding replica exchange molecular-dynamics simulations of Trp-cage in presence of urea, over a wide range of urea concentration. The increase in preferential interaction upon unfolding is dominated by the side-chain contribution, rather than the backbone. Similar trends are observed in simulations using two different force fields, Amber94 and Amber99sb, for the protein. The magnitudes of the side-chain and backbone contributions differ in the two force fields, despite containing identical protein-solvent interaction terms. The differences arise from the unfolded ensembles sampled, with Amber99sb favoring conformations with larger surface area and lower helical content. These results emphasize the importance of the side-chain interactions with urea in protein denaturation, and highlight the dependence of the computed driving forces on the unfolded ensemble sampled