Nucleophilic substitution is a classic chemical reaction in which an electron-rich nucleophile selectively attacks an electrophilic center to substitute a leaving group.

A nucleophile has a lone pair of electrons. A reactant is made of R, which is any group, and a leaving group. The necrophile and molecule react to form two products. Product one is made of R bonded to the nucleophile. Product two is the leaving group with a lone pair of electrons.

Figure 1: General reaction scheme for nucleophilic substitution

The electron pair (:) from the nucleophile attacks the substrate and uses the lone pair to form a new R-Nu bond, while the leaving group (LG) leaves with an electron pair. The nucleophile might be negatively charged or neutral, whereas the substrate is usually neutral or positively charged.

Nucleophilic substitution can occur via one of two competing reaction mechanisms. The two main mechanisms are the SN1 reaction and SN2 reaction. The S denotes 'substitution', N for 'nucleophilic' and the number represents the kinetic order of the reaction - or the number of reagents involved in the rate-limiting step.

There are several factors that could affect whether a substitution reaction occurs via the SN1 or SN2 reaction mechanism; not limited to: high nucleophilicity of the nucleophile, willingness of the leaving group, solvent type, and steric bulk of the alkyl substrate.