A heterocyclic compound is a cyclic compound that has atoms of at least two different elements as members of its ring(s). The counterparts of heterocyclic compounds are homocyclic compounds, the rings of which are made of a single element.
Although heterocyclic compounds may be inorganic, most contain at least one carbon. Since in organic chemistry non-carbons usually are considered to replace carbon atoms, they are called heteroatoms, meaning 'different from carbon and hydrogen' (rings of heteroatoms of the same element are homocyclic). The IUPAC recommends the Hantzsch-Widman nomenclature for naming heterocyclic compounds.
Heterocyclic chemistry is the branch of chemistry dealing with synthesis, properties, and applications of heterocycles.
Classification based on electronic structure 
Heterocyclic compounds can be usefully classified based on their electronic structure. The saturated heterocycles behave like the acyclic derivatives. Thus, piperidine and tetrahydrofuran are conventional amines and ethers, with modified steric profiles. Therefore, the study of heterocyclic chemistry focuses especially on unsaturated derivatives, and the preponderance of work and applications involves unstrained 5- and 6-membered rings. Included are pyridine, thiophene, pyrrole, and furan. Another large class of heterocycles are fused to benzene rings, which for pyridine, thiophene, pyrrole, and furan are quinoline, benzothiophene, indole, and benzofuran, respectively. Fusion of two benzene rings gives rise to a third large family of compounds, respectively the acridine, dibenzothiophene, carbazole, and dibenzofuran. The unsaturated rings can be classified according to the participation of the heteroatom in the pi system.
3-Membered rings 
Heterocycles with three atoms in the ring are more reactive because of ring strain. Those containing one heteroatom are, in general, stable. Those with two heteroatoms are more likely to occur as reactive intermediates.
Common 3-membered heterocycles with one heteroatom are:
|Oxygen||Oxirane (ethylene oxide, epoxides)||Oxirene|
Those with two heteroatoms include:
4-Membered rings 
Compounds with one heteroatom:
Compounds with two heteroatoms:
5-Membered rings 
Five-membered rings with one heteroatom:
|Nitrogen||Pyrrolidine (Azolidine is not used)||Pyrrole (Azole is not used)|
|Oxygen||Tetrahydrofuran(Oxolane is rare)||Furan (Oxole is not used)|
|Sulfur||Thiolane||Thiophene (Thiole is not used)|
The 5-membered ring compounds containing two heteroatoms, at least one of which is nitrogen, are collectively called the azoles. Thiazoles and isothiazoles contain a sulfur and a nitrogen atom in the ring. Dithiolanes have two sulfur atoms.
|Heteroatom||Saturated||Unsaturated (and partially unsaturated)|
A large group of 5-membered ring compounds with three heteroatoms also exists. One example is dithiazoles that contain two sulfur and a nitrogen atom.
|3 × Nitrogen||Triazoles|
|2 × Nitrogen / 1 × oxygen||Furazan
|2 × Nitrogen / 1 × sulfur||Thiadiazole|
|1 × Nitrogen / 2 × sulfur||Dithiazole|
Five-member ring compounds with four heteroatoms:
|4 × Nitrogen||Tetrazole|
With 5-heteroatoms, the compound may be considered inorganic rather than heterocyclic. Pentazole is the all nitrogen heteroatom unsaturated compound.
6-Membered rings 
Six-membered rings with a single heteroatom:
|Nitrogen||Piperidine (Azinane is not used)||Pyridine (Azine is not used)|
|Oxygen||Oxane||Pyran (2H-Oxine is not used)|
|Sulfur||Thiane||Thiopyran (2H-Thiine is not used)|
With two heteroatoms:
|Nitrogen / nitrogen||Piperazine||Diazines|
|Oxygen / nitrogen||Morpholine||Oxazine|
|Sulfur / nitrogen||Thiomorpholine||Thiazine|
|Oxygen / oxygen||Dioxane||Dioxine|
|Sulfur / sulfur||Dithiane||Dithiine|
With three heteroatoms:
With four heteroatoms:
The hypothetical compound with six nitrogen heteroatoms would be hexazine.
7-Membered rings 
With 7-membered rings, the heteroatom must be able to provide an empty pi orbital (e.g., boron) for "normal" aromatic stabilization to be available; otherwise, homoaromaticity may be possible. Compounds with one heteroatom include:
Those with two heteroatoms include:
8-Membered rings 
Fused rings 
Heterocyclic rings systems that are formally derived by fusion with other rings, either carbocyclic or heterocyclic, have a variety of common and systematic names. For example, with the benzo-fused unsaturated nitrogen heterocycles, pyrrole provides indole or isoindole depending on the orientation. The pyridine analog is quinoline or isoquinoline. For azepine, benzazepine is the preferred name. Likewise, the compounds with two benzene rings fused to the central heterocycle are carbazole, acridine, and dibenzoazepine.
History of heterocyclic chemistry 
The history of heterocyclic chemistry began in the 1800s, in step with the development of organic chemistry. Some noteworthy developments:
1818: Brugnatelli isolates alloxan from uric acid
1832: Dobereiner produces furfural (a furan) by treating starch with sulfuric acid
1834: Runge obtains pyrrole ("fiery oil") by dry distillation of bones
1906: Friedlander synthesizes indigo dye, allowing synthetic chemistry to displace a large agricultural industry
1936: Treibs isolates chlorophyl derivatives from crude oil, explaining the biological origin of petroleum.
1951: Chargaff's rules are described, highlighting the role of heterocyclic compounds (purines and pyrimidines) in the genetic code.
Commercial Exploitation 
Leading companies with a vast amount of patents related to heterocyclic compounds are Bayer, Merck, Ciba-Geigy, Pfizer, Eli Lily, BASF, Hoffmann La Roche, ER Sqibb, Warner Lambert and Hoechst.
- IUPAC Gold Book heterocyclic compounds
- E. Campaigne "Adrien Albert and the Rationalization of Heterocyclic Chemistry" J. Chemical Education 1986, Volume 6, 860. doi:10.1021/ed063p860
- Companies with the highest number of patents related to heterocyclic compounds.
|Wikimedia Commons has media related to: heterocyclic compounds|
- Hantzsch-Widman nomenclature, IUPAC
- Heterocyclic amines in cooked meat, US CDC
- List of known and probable carcinogens, American Cancer Society
- List of known carcinogens by the State of California, Proposition 65 (more comprehensive)