Genetic robustness refers to phenotypic invariance in the face of mutation and is a common characteristic of life, but its evolutionary origin is highly controversial. Genetic robustness could be an intrinsic property of biological systems, a result of direct natural selection, or a byproduct of selection for environmental robustness. To differentiate among these hypotheses, we analyze the metabolic network of Escherichia coli and comparable functional random networks. Treating the flux of each reaction as a trait and computationally predicting trait values upon mutations or environmental shifts, we discover that 1) genetic robustness is greater for the actual network than the random networks, 2) the genetic robustness of a trait increases with trait importance and this correlation is stronger in the actual network than in the random networks, and 3) the above result holds even after the control of environmental robustness. These findings demonstrate an adaptive origin of genetic robustness, consistent with the theoretical prediction that, under certain conditions, direct selection is sufficiently powerful to promote genetic robustness in cellular organisms.