The mechanism of Staudinger ligation involves the reaction of an azide with a phosphine to form an aza-ylide intermediate. This intermediate then undergoes a rearrangement to form an amide bond. The overall reaction is represented as follows: \[ R-N_3 + R'-PPh_3 \rightarrow R-N=PPh_3 \rightarrow R-NH-CO-R' \]