Why do halogen-metal exchanges happen?
How Did Wittig Come to Discover Lithium-Halogen-Exchange?

Georg Wittig, discoverer of the Wittig reaction, was studying the effect of ring strain on the strength of two neighboring carbons; by adding enough strain he expected to coax C-C bonds into forming diradicals:


Unfortunately tetraphenylbenzocyclobutane rearranges to triphenyldihydroanthrancene instead of forming a diyl. This and other “failures” did not deter Wittig; they elected to continue by replacing phenyl groups with anisyls. To their surprise, reactions with anisyls gave unexpected products. They focused their efforts on a simple derivatization with benzil to characterize the major product. They were trying to synthesize $p$-anisyldiphenylcarbinol, but instead what happened is:



Continuing along they discovered phenyllithium would perform the same reaction. As part of their investigation they varied other substituents on the aryl halide and discovered an even more peculiar product which violated their chemical intuition. Wittig was the first to speculate a lithium-bromide exchange reaction in 1938, below is the reaction he and coworkers carried out in diethyl ether giving a high yield (95%), the preferred product led them to infer it went through an aryllithium intermediate:

This same reaction occured with iodine, bromine, and chlorine. Yet, fluorine gave products via an entirely different mechanism. This led them to postulate an aryne intermediate. They then set off in a new direction, by trying to weaken carbon-hydrogen bonds with a neighboring quaternary ammonium, this led them to discover N-ylides. It was found this more readily occurred with phosphonium, where they discovered P-ylides. Now you can see the rough outline of the path required to discover the Wittig reaction.

How Does Lithium-Halogen Exchange Work?

This initial discovery by Wittig and then Gilman encouraged further efforts because it allowed the formation of a number of previously inaccessible organometallics. In the above reaction, the Grignard reagent cannot simply replace phenyllithiun (some Mg cases have been reported for other halides, but Li is the stalwart metal).

Today this reversible lithium-halogen exchange reaction can be formulated as,
$$\ce{RLi + R’X &lt;=&gt;[{K}]  R’Li + RX}.$$

As an equilibrium process, we know that the more stable lithium species is preferred. Interestingly when $\ce{R’}$ = aryl (particularly bromides and iodides) this is best written as, $$\ce{RLi + R’X &lt;=&gt;&gt; R’Li + RX}.$$

When $\ce{R’} = $ allylic or benzylic, Wurtz coupling is favored. $\ce{R’} = $ alkyl tend to give unsatisfactory results. In general, the equilibrium favors those species which most stabilize the carbonanion intermediate. Depending on the specific halide, side-product formation is a problem: $\beta$-elimination, $\alpha$-metalation, or Wurtz-type reactions can occur.

Gilman discovered that alkyllithiums, for example t-butyllithium, were more adaptable in their reactivity than aryllithiums, which explains their widespread success in the modern chemical literature.

How the reaction proceeds remains an unresolved problem, however, there is evidence to suggest the following mechanisms are at play:

(1) intermediates proceeding through an “ate” complex

Perhaps unsurprising to you by now, Wittig also hypothesized the existence of an "ate" complex intermediate: 

This is in other words, a nucleophilic attack of the halide by the alkyllithium with a carbonanion leaving group.

(2) radical mechanisms

A one electron transfer from the nucleophile to halide thereby producing a radical intermediate that then can give rise to a number of products. There are data from EPR and radical caging experiments to suggest radicals at least form.

(3) mixtures of (1) and (2)

As with many systems, the truth is both mechanisms compete with each other; of course which pathway, if any, dominates will depend on the solvent, temperature, substrate, and certainly the lithium species used.

tert-Butyllithium requires 2 equivalents, resulting in a non-equilibrium process where: $$\ce{RX + (Me)3CLi -&gt; RLi + (Me)3CX}$$ $$\ce{(Me)3CX + (Me)3CLi -&gt; (Me)3CH ^ + (Me)2C=CH2 ^ + LiX}.$$