Organic Reagents

By James Ashenhurst

Reagent Friday – Diazomethane (CH2N2)

Last updated: March 4th, 2020 |

Reactions Of Diazomethane (CH2N2) And Their Mechanisms

In a blatant plug for the Reagent Guide and the Reagents App for iPhone, each Friday  I profile a different reagent that is commonly encountered in Org 1/ Org 2. 

diazomethane-lewis-structur

One of the things about learning organic chemistry from a textbook is that about 98% of you will never really have to consider the practical aspects of working with many of the reagents that you learn about.  That’s OK. While it’s good to get your hands dirty in the lab as an undergraduate,  most of you can probably live without working with today’s reagent. Because today’s reagent, diazomethane (CH2N2) is the kind of reagent that you should only handle if you really, really really have to. Nothing gets a chemists’ adrenaline going like a reagent that is 1) acutely toxic 2) volatile 3) extremely carcinogenic, and 4) highly explosive. So many ways to die! But I’m getting ahead of myself here. Let’s talk about the textbook stuff!

Diazomethane is actually a really simple molecule. It’s merely a methylene carbon (CH2) attached to dinitrogen (N2). Now as you might well be aware, every nitrogen atoms’ goal in life is to regain the freedom it had as a molecule of dinitrogen (N2),  in the earth’s atmosphere – and in diazomethane, this can be attained merely through breaking of a single carbon-nitrogen bond. This makes diazomethane a rather frisky little molecule and highly reactive in a number of reactions.

Conversion Of Carboxylic Acids To Methyl Esters By Diazomethane (CH2N2)

So what’s it used for? Three things.

First of all, carboxylic acids treated with diazomethane will make methyl esters. This is a really simple reaction. See that no heat or acid is required? It just works!

diazomethane-for-conversion-of-carboxylic-acids-to-methyl-esters

Diazomethane And The Wolff Rearrangement

Diazomethane will also add to acid chlorides. When the diazo species is then heated, or treated with a metal like silver, a remarkable transformation occurs: nitrogen is lost, and a rearrangement occurs. After addition of water, the net result is that a carboxylic acid has been extended by one carbon. This is called the Wolff rearrangement.

diazomethane-in-the-conversion-of-acyl-halides-to-chain-extended-carboxyli-acids-in-the-wolff-rearrangement

Cyclopropanation Of Alkenes With Diazomethane

Finally, if you take an alkene and treat it with diazomethane, cyclopropanation reactions can occur. Here’s the scheme:

diazomethane-in-the-formation-of-cyclopropanes

Conversion Of Carboxylic Acids To Methyl Esters With CH2N2 – The Mechanism

How it works: here’s how the reaction of carboxylic acids proceeds with diazomethane. First, protonation of diazomethane by the carboxylic acid gives CH3-N2. This is now a superb alkylating agent, since N2 is one of the best leaving groups there is. Attack on the carbon by the carboxylate ion (that’s deprotonated carboxylic acid) gives the methyl ester.

diazomethane-mechanism-for-the-formation-of-methyl-esters-from-carboxylic-acids.

The Wolff rearrangement is awesome but this post is going to be long enough as it is. You can see the mechanism here. 

Cyclopropanation Of Alkenes With CH2N2 – The Mechanism

Cyclopropanation is worth talking about. See, when diazomethane is heated or treated with light, something very interesting happens: nitrogen takes the pair of electrons in the N–C bond and escapes to freedom as N2, while the carbon is left with an empty orbital in addition to its pair of electrons. This species – a neutral, divalent carbon with a lone pair and an empty orbital – is called a carbene. Carbenes are fascinating and there isn’t enough space here to give them justice. This carbene in particular (“methylene carbene”) is one of the most reactive chemical species known. Here, it adds to the alkene to form the cyclopropane, although in practice methylene carbene can do all kinds of other funky jazz. The actual use of diazomethane for cyclopropanation reactions is usually a little more complicated, reagent-wise, than is depicted here.

dissociation-of-n2-from-diazomethane-to-give-a-carbene-methylene-carbene

Don’t Work With CH2N2 In The Lab Unless You Know What You’re Doing

Real life tips: Oh man, there are so many. Here’s one: don’t ever, ever work with diazomethane unless you have been trained by someone who has worked with it themselves. Although generally never used neat (it boils at –23 deg C) and typically handled as a dilute solution in ether, diazomethane has a nasty tendency to explode when in the presence of high-surface-area materials (such as ground-glass joints, or, God forbid,  metal syringes).  If dispensing with a pipet, it’s crucial to flame-polish the edges for safety. Furthermore, diazomethane is acutely toxic: people have died from inhaling it. And if it doesn’t kill you in the short term, there’s always the long term. See, diazomethane, being an alkylating agent, has a tendency to react with (i.e. alkylate) your DNA, leading to base-pair mismatches, mutations, and – eventually – cancer.

So why use it at all? Because it’s the best. I confess that the formation of methyl esters from the reaction of carboxylic acids with diazomethane is one of my favorite reactions. You make a solution of your carboxylic acid in ether,  dispense the bright yellow diazomethane solution by pipet – slowly – until the yellow color persists, wait about 5 minutes to be sure that all the N2 has bubbled off, kill the excess diazomethane with a few drops of acetic acid, and concentrate. Easiest reaction ever.

For some riveting, mouth-agape horror stories of diazomethane in the lab, check out this thread from In the Pipeline : Diazomethane: How Not To Do It.

P.S. You can read about the chemistry of CH2N2 and more than 80 other reagents in undergraduate organic chemistry in the “Organic Chemistry Reagent Guide”, available here as a downloadable PDF. The Reagents App is also available for iPhone, click on the icon below!


(Advanced) References and Further Reading

Diazomethane is a reagent commonly used in organic chemistry for a variety of transformations. It is too reactive to be sold as a pure compound; it is generated from precursors in solution and used immediately.

  1. Ueber Diazomethan
    V. Pechmann
    Chem. Ber. 1894, 27 (2), 1888-1891
    DOI:
    10.1002/cber.189402702141
  2. Ueber Diazomethan
    v. Pechmann
    Chem. Ber. 1895, 28 (1), 855-861
    DOI:
    10.1002/cber.189502801189
    The first two papers by Hans von Pechmann on the synthesis and discovery of diazomethane.
  3. DIAZOMETHANE
    J. de Boer and H. J. Backer
    Org. Synth. 1956, 36, 16
    DOI:
    10.15227/orgsyn.036.0016
    This procedure, the base-catalyzed decomposition of p-tolylsulfonylmethylnitrosamide, is the most common method for preparing diazomethane today. The diazomethane is generated as an ethereal solution and should be used quickly. Aldrich sells kits for the preparation of diazomethane based on this, and the precursor is commercially available and is commonly called ‘DIAZALD®’.
  4. DIDEUTERIODIAZOMETHANE
    G. Gassman and W. J. Greenlee
    Org. Synth. 1973, 53, 38
    DOI:
    10.15227/orgsyn.053.0038
    Note 1 in this procedure has detailed notes on safety regarding the use of diazomethane. Teflon stirbars should be used, metal should be avoided, the solution kept away from light, and glassware with ground-glass joints should not be used.
  5. Iron-Catalyzed Cyclopropanation in 6 M KOH with in Situ Generation of Diazomethane
    Bill Morandi and Erick M. Carreira
    Science 23 Mar 2012: Vol. 335, Issue 6075, pp. 1471-1474
    DOI:
    1126/science.1218781
    This paper describes a ‘one-pot’ cyclopropanation of styrenes and related compounds without the prior isolation of diazomethane, thereby making this chemistry safer and more practical.
  6. Trimethylsilyl-substituted diazoalkanes : I. Trimethylsilyldiazomethane
    Dietmar Seyferth, Horst Menzel, Alan W. Dow, Thomas C. Flood
    Journal of Organometallic Chemistry 1972, 44 (2), 279-290
    DOI:
    1016/S0022-328X(00)82916-2
    Trimethylsilyldiazomethane (aka ‘TMS-diazomethane’) is a much easier to handle alternative to diazomethane. It is commercially available and can be used for much of the same reactions that diazomethane undergoes.
  7. Rapid and convenient isolation and methyl esterification of water-soluble acids using diazomethane
    J. Eisenbraun, R. N. Morris, and G. Adolphen
    Journal of Chemical Education 1970, 47 (10), 710
    DOI:
    10.1021/ed047p710
    This is a short note that describes a modification to the usual esterification procedure with diazomethane to facilitate the esterification of water-soluble carboxylic acids.
  8. Mechanism of Methyl Esterification of Carboxylic Acids by Trimethylsilyldiazomethane
    Erik Kühnel, David D. P. Laffan, Guy C. Lloyd‐Jones, Teresa Martínez del Campo, Ian R. Shepperson, Jennifer L. Slaughter
    Angew. Chem. Int. Ed. 2007, 46 (37), 7075-7078
    DOI: 10.1002/anie.200702131
    The esterification of carboxylic acids is a common reaction of diazoalkanes, especially diazomethane. TMS-diazomethane can also be used for this reaction as a safer alternative to diazomethane

Comments

Comment section

22 thoughts on “Reagent Friday – Diazomethane (CH2N2)

  1. Ah yes, diazomethane. I had a friend in grad school, now graduated, who had to work with it once. He was legendary for his operational prowess in the lab—and diazomethane scared the pants off of him!

    Notably, diazomethane is also probably the smallest ylide. I like to think of ylides as both nucleophilic and electrophilic at C—that’s why cyclopropanation works, because alkenes are both nucleophilic and electrophilic too (albeit on different atoms). Diazomethane, Simmons-Smith, Corey-Chaykovsky, and even rhodium carbenoids all operate on this principle.

    1. I never thought of it as an ylide! but it makes perfect sense.

      I was more scared by the making of it than actually using it, but it was definitely a two-hands-on-the-flask kind of reagent when you transfer it from the fridge to the hood.

  2. I’ve been thinking about this for the past couple of days and did some reading up on diazomethane, but still haven’t been able to figure out why it has a tendency to explode when in the presence of high-surface-area materials or sharp edges. Does it have to do with the increased friction associated w/ high-surface areas and sharp edges?

    1. I’m not 100% certain on this, but here’s my best guess. The surface of glass can be mildly acidic due to Si-OH groups. On a surface with enough hydrogen bond donors present you might be able to protonate/stabilize the CH2 and/or displace N2, and the exotherm in doing so may catalyze further reaction.

  3. Thank you very much for this invaluable support. Many android users we would also love to have thiss type of support on our cell phones, do you plan to relase the app also for android?. Thanks again!

  4. Hi!
    I have just find this website some minutes ago. I am a girl from Hungary, and last week I made an experiment with diazomethane, but I do not know, what happened, and I am really curious about your opinion.
    So I wanted to make methyl chloroacetate, that’s why I solve 1 g chloroacetic acid in 10 ml THF and add diazomethane to that compound. I was waiting for 30 minutes and add 0,5 ml water. Then I evaporate the THF, and what I got was – in the beginning yellow, then really RED thing. I found it very strange, because I had thought the esther will be clear. My teacher check it in MS, and we did not have the molar mass of methyl chloroacetate in the chromatogram. Do you have any idea what happens? I am really excited!
    Thank you very much in advance,
    Veronika

  5. James,
    Loved your expose’. I have been using diazomethane for…I think 30-40 years (I’m 75, and still in one piece). Use it for pesticide analysis by GC-MS. Love it because it methylates sterically hindered benzoic acids, and phenols at the same time, AND does not affect my non-acid pesticides…so I can analyze them all together at once, when I want to. Discovered and reported that in NIOSH methods NMAM 9201 and 5602. In a method now being written up for NIOSH I evaluated the effects of diazomethane on dozens more of non-acid pesticides. It methylates imides (with an ionizable proton, e.g., acephate), and some keto-enol types (e.g., warfarin). It causes alpha-cyano pyrethroids to racemize around the benzylic carbon. Haven’t figured that one out. These effects are being reported in upcoming NIOSH methods. Couldn’t get it to methylate thio-acids. Have to resort to iodomethane.
    John M. Reynolds

    1. Fantastic comment. Very interesting. CH2N2 formation of methyl esters is definitely my favorite reaction to run: add, wait for bubbling to stop, then concentrate. Could you share a link to your methods?

  6. The new multiple-pesticide residue methods (MRM) were designated as NIOSH 5605 and 9204. They have not been published yet. In fact NIOSH hasn’t even reviewed them yet.(they had some cutbacks just after we finished the methods). We are in contact with them and sometime this month or next they want to talk to us about getting the final versions of the methods. So far 5602 and 9201 are the only methods we did that use diazomethane that have been published (can find them by searching “NIOSH 5602” or 9201 on line). Those published methods do not discuss the effects of diazomethane that we will report in 5605 and 9204. At this point the latter two methods are still NIOSH property and we are scheduled to work with NIOSH contacts later this month or next to get these method to them for final review. (It takes forever.)

    These later NIOSH methods do not in themselves delve into the mechanism, it just reports the phenomenon as a caution to those using diazomethane in a MRM involving both acids and neutrals.
    John M. Reynolds

  7. If we add this compound (diazomethane) to cyclopentanal, will we get cyclohexanal. If yes, is this type of reaction called kohler synthesis?

  8. Thank you for creating not only the best organic chemistry website but really the only website that is of any help. I am taking organic chemistry II right now and this site is a lifesaver! It is a better resource than my textbook by far, from the amount of information to the way you explain everything. Just wanted to let you know I really appreciate your work!

    1. Great question Eric. It depends on scale. For large scale reactions (say a gram or more) the Fischer is probably your best bet for reasons of cost and safety. It’s “set and forget”, come back in a few hours or the next morning and it will be done.
      However a lot of exploratory organic chemistry is done on 50-100 mg of material (or less!) and in these cases, setting up a Fischer with a Dean-Stark trap isn’t very effective. Having a reagent available such as diazomethane that can quickly and easily (20 minutes !) install a methyl ester on a carboxylic acid is a huge time saver.

  9. In the late 1980s in the all the way into the mid- 1990s, as an Sr Laboratory Tech I set up the organic synthesis using Diazald® kit through Aldrich .

    I perform 200 to 300 herbicide analyses per year through MTH 8150 SW 846. 3 version and I extracted my own samples.

    I was well trained and well-versed in the safety hazards to being very cautious, and handling during the organic synthesis.

    No ground glass joints!!. Ice down bath in the receiving flask. The reactions took place under a fume Hood and behind safety tempered blast shield.

    Everything was smooth glass joints, triple rinse with petroleum ether production of least 100 to 200 milliliters of diazomethane at the end the synthesis was placed put into 4 or 5 40 mil Amber – Brown Teflon sealed capped then stored at 4 degrees Celsius in the laboratory refrigerator. Until was needed for reagent during the second part of the extraction process of MTH 8150.

    After the rigorous extraction of at least 10 to 15 samples per day which took two days. Or 2/8 hour shift work., after the extraction of samples with diethyl ether was almost complete post Nordstrom blowdown throughs volume Zymark turbovap nitrogen blowdown. I would use the diazomethane 1 mil into each vial let it react for at least 2 to 3 minutes until bubbling stopped or I add silicic acid to stop the reaction. Transferred to GC vial be via pipette, capped, transferred to the GC /MS . For years, I never gave any thought about being injured on the job.

    1. Under normal conditions, no reaction, but if the CH2N2 is agitated photochemically there could be formation of carbene and C-H insertion to either C-1 or C-2 of propane. Not something I would recommend.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.