Organic Chemistry · Amines and Heterocycles

Heterocyclic Amines

7 min read
Basicity constants (pyridine pKaH ≈ 5.2, pyrrole ≈ −3.8, imidazole ≈ 7.0, aniline ≈ 4.6, pyrimidine ≈ 1.3, pyrrole N–H pKa ≈ 17.5, histidine imidazolium ≈ 6.0) are standard literature values from public pKa compilations (e.g., Evans pKa table). General laboratory principles only; no specific experimental procedures are given.
Want it in plain words first? Jump to Eli explains — the same idea, no jargon.
On this page 9 sections
  1. In 30 seconds
  2. Why this matters
  3. The college version
  4. Eli explains
  5. Worked example
  6. Key takeaway
  7. Check yourself
  8. Study tools
  9. Sources & references

In 30 seconds

A heterocycle is a ring whose atoms are not all carbon; a heterocyclic amine is such a ring containing nitrogen. Where the lone pair sits decides everything:

  • Pyridine-type (six-membered rings): the lone pair sits in an sp² orbital in the ring plane, not part of the π system — it is free, so is a real base.
  • Pyrrole-type (five-membered rings): the lone pair sits in a p orbital, part of the π system — it is spent, so is not basic; its N–H is weakly acidic.

contains both types — a pyrrole-like N–H and a pyridine-like N — the most useful acid–base switch in biochemistry. Around these skeletons grow the molecules of life: the DNA bases, histidine, nicotine, tryptophan, serotonin, and the heme of hemoglobin.

Why this matters

  • Drugs are mostly heterocycles: nicotine, caffeine (a purine), penicillin (a β-lactam), and quinine (a quinoline).
  • DNA and RNA: adenine, guanine, cytosine, thymine, and uracil are purines and pyrimidines; ring nitrogens set their hydrogen-bonding patterns.
  • Enzyme catalysis: the imidazole side chain of histidine is the acid–base catalyst in countless enzymes because it can accept or donate a proton right at physiological pH.

The college version

Core Concepts

Pyridine: the basic six-membered ring

Pyridine (C5H5N) is aromatic with six π electrons (three C=C units). Its nitrogen is sp²: the lone pair points out along the C–N bond, outside the sextet, and stays available for protonation:

C5H5N + H+ ⇌ C5H5NH+

The conjugate acid has pKaH ≈ 5.2 — comparable to aniline (4.6), far more basic than pyrrole. Because its ring is electron-poor, pyridine's electrophilic substitution is slow and occurs at C3. , with two nitrogens, is less basic still (pKaH ≈ 1.3).

Pyrrole: the nonbasic five-membered ring

Pyrrole (C4H5NH) is aromatic with six π electrons — two C=C units plus the nitrogen lone pair. The lone pair is required for aromaticity, so it cannot be given to a proton without destroying the sextet. Pyrrole's conjugate acid has pKaH ≈ -3.8; pyrrole is essentially nonbasic. Instead, the N–H is weakly acidic (pKa ≈ 17.5): strong bases such as KH or NaH remove it, giving the nucleophilic pyrrolyl anion. Pyrrole is electron-rich, so electrophilic substitution is fast — at C2.

Imidazole: the best of both worlds

Imidazole is a five-membered ring with two nitrogens: a pyrrole-like N–H (lone pair in the sextet) and a pyridine-like N (lone pair available). Protonation of the pyridine-like nitrogen gives the imidazolium ion:

C3H4N2 + H+ ⇌ C3H4N2H+

with pKaH ≈ 7.0. Because that is near physiological pH (7.4), imidazole is a roughly balanced mix of neutral and protonated forms in the body — exactly what an enzyme needs in an acid–base catalyst. The histidine side chain is an imidazole; that is why histidine appears in enzyme active sites.

The basicity ladder

Conjugate-acid pKaH values, high to low:

CompoundpKaHReason
Imidazole≈ 7.0pyridine-like N available; cation stabilized by the second N
Pyridine≈ 5.2lone pair available; protonation costs no aromaticity
Aniline≈ 4.6lone pair partly delocalized into the ring
Pyrrole≈ −3.8protonation would destroy the aromatic sextet

Compare alkyl amines (≈ 10.6): rings always cost basicity, but the cost is tiny for pyridine-type nitrogen and enormous for pyrrole-type.

Fused rings: indole, purine, porphyrin

Indole is benzene fused to pyrrole — the side chain of tryptophan and core of serotonin. Purine is pyrimidine fused to imidazole (adenine, guanine, caffeine). Porphyrin is a macrocycle of four pyrrole-type rings holding a metal ion in heme (iron) and chlorophyll (magnesium).

How It Works / Step-by-Step Process

To predict whether a heterocyclic nitrogen is basic:

  1. Draw the ring and locate the nitrogen's lone pair.
  2. Is the lone pair in a p orbital aligned with the π system? If yes (pyrrole-type), it is part of the sextet — not available.
  3. If the lone pair is in an sp² orbital in the ring plane (pyridine-type), it is free — the nitrogen is basic.
  4. Look for a second nitrogen: an N–H plus a pyridine-like N means imidazole-like behavior (pKaH near 7); then compare pKaH values at the pH of interest.

Common Confusions

Do Not ConfuseWithDifference
PyridinePyrroleBoth aromatic N-heterocycles, but pyridine is basic (sp² lone pair free) and pyrrole is not (lone pair in the sextet)
"Pyrrole is a strong base because it is an amine"Amine basicityProtonating pyrrole would destroy its aromatic sextet, so its conjugate acid has pKaH ≈ −3.8
The two nitrogens of imidazoleIdentical rolesOne is pyrrole-like (N–H, lone pair in sextet); one is pyridine-like (free lone pair) — only the second is basic
Eli, the EliExplains learning guide

Eli explains

The same idea, in plain words

Explain it like I’m 10

A circle of six kids holding hands, one with a free hand sticking out, is pyridine: it can still grab a proton like a high-five. Now a circle of five kids where the nitrogen kid must use both hands to hold the circle together — that's pyrrole: no free hand, so it can't grab anything. Imidazole is a five-kid circle with two nitrogen kids — one busy holding the circle, one with a free hand — so it can grab or release a proton depending on the pH.

Worked example

Example 1: Histidine's protonation state at two pH values

The imidazolium form of histidine's side chain has pKa ≈ 6.0. What fraction is protonated at blood pH 7.4, and at lysosomal pH 5.0?

Using:

log[B][BH+] = pH - pKa

At pH 7.4:

log[B][BH+] = 7.4 - 6.0 = 1.4   ⇒  [B][BH+] ≈ 25

Fraction protonated = [BH+]/[B] + [BH+] = 1/(1 + 25) ≈ 0.038, about 3.8%. At pH 5.0:

log[B][BH+] = 5.0 - 6.0 = -1.0   ⇒  [B][BH+] = 0.10

Fraction protonated = 1/(1 + 0.10) ≈ 0.91, about 91%. At blood pH imidazole is mostly neutral (ready to accept a proton); in the acidic lysosome it is mostly protonated. One pKa, two very different behaviors.

Example 2: Counting π electrons with Hückel's rule

Hückel's rule: aromatic rings contain 4n + 2 π electrons; for n = 1, that is 4(1) + 2 = 6.

  • Pyridine: three C=C units contribute 6 π electrons; the lone pair (sp² orbital) is not counted. Total: 6 ✓.
  • Pyrrole: two C=C units contribute 4 π electrons; the lone pair (p orbital) is counted. Total: 6 ✓.

Both rings are aromatic with the same electron count — but pyrrole's lone pair is spent on aromaticity, while pyridine's is free. The count alone cannot tell you basicity; ask where the lone pair lives.

Key takeaways

  • Pyridine: lone pair in an sp² orbital, not in the sextet → basic (pKaH ≈ 5.2); EAS slow, at C3.
  • Pyrrole: lone pair in a p orbital, in the sextet → nonbasic (pKaH ≈ −3.8); N–H acidic (pKa ≈ 17.5); EAS fast at C2.
  • Imidazole: pyrrole-type N–H + pyridine-type N → pKaH ≈ 7.0, the most basic of the three.
  • Pyridine and pyrrole are both aromatic with 6 π electrons — the difference is which electrons are counted.
  • Basicity: imidazole (7.0) > pyridine (5.2) > aniline (4.6) ≫ pyrrole (−3.8); alkylamines ≈ 10.6.
  • Histidine's imidazole buffers near pH 7; DNA bases are purines/pyrimidines.

Check yourself

5 review questions from the chapter. Try each one, then open the answer.

  1. Why is pyridine basic but pyrrole is not, even though both are aromatic?

    Show answer

    In pyridine the lone pair is in an sp² orbital in the ring plane, outside the π system, so it is free to bind a proton. In pyrrole it is in a p orbital and is one of the six π electrons required for aromaticity — giving it up destroys the sextet.

  2. Order these by pKaH: pyrrole, pyridine, imidazole, aniline.

    Show answer

    Imidazole (≈ 7.0) > pyridine (≈ 5.2) > aniline (≈ 4.6) ≫ pyrrole (≈ −3.8).

  3. Which nitrogen in imidazole is basic, and why does the imidazolium ion have pKaH ≈ 7.0?

    Show answer

    The pyridine-like nitrogen (the one without H). Its lone pair is available, and the imidazolium ion's positive charge is stabilized by the neighboring pyrrole-type nitrogen.

  4. How many π electrons do pyridine and pyrrole each have, and where does each lone pair live?

    Show answer

    Both have 6 π electrons (4n + 2, n = 1). Pyridine's come from three C=C units, with the lone pair excluded; pyrrole's come from two C=C units plus the included lone pair.

  5. Give one biological role each for imidazole, a purine, and a porphyrin.

    Show answer

    Imidazole (histidine) is an acid–base catalyst in enzymes; purines (adenine, guanine) are DNA/RNA bases; porphyrins hold the metal ions in heme and chlorophyll.

Keep learning

Ready to build on this? Continue to the next lesson.

Study tools & related lessonsKey vocabulary · Related

Key vocabulary

pyridine
Six-membered aromatic ring, one N, C5H5N
pyrrole
Five-membered aromatic ring, one N–H, C4H5N
imidazole
Five-membered ring with two N (one N–H, one pyridine-like)
aromatic sextet
The six π electrons that satisfy Hückel's rule
pyrimidine
Six-membered ring with two N

Sources & references

  1. openstax.org — Organic Chemistry

This lesson was adapted from the open educational references above; their licenses and attributions are preserved. See Copyright & Licensing.

Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.