We investigate static and dynamical ground-state properties of the two-impurity Anderson model at half filling in the limit of vanishing impurity separation using the dynamical density-matrix renormalization group method. In the weak-coupling regime, we find a quantum phase transition as function of inter-impurity hopping driven by the charge degrees of freedom. For large values of the local Coulomb repulsion, the transition is driven instead by a competition between local and non-local magnetic correlations. We find evidence that, in contrast to the usual phenomenological picture, it seems to be the bare effective exchange interactions which trigger the observed transition.