The Lewis dot structure of HCN is one of the clearest ways to see how valence electrons organize themselves around a small but chemically important molecule. Hydrogen cyanide contains only three atoms, yet it features a single bond, a triple bond, and a lone pair, making it a compact case study for electron counting, octet rules, and formal charge.

Hydrogen cyanide is a linear, polar molecule with the chemical formula HCN. Its Lewis structure explains why carbon sits in the middle, why nitrogen carries a lone pair, and why the carbon-nitrogen connection is drawn as a triple bond rather than a double or single bond. Learning to draw the structure correctly also builds the foundation for understanding cyanide chemistry, molecular geometry, and bond polarity.

Counting Valence Electrons and Building the HCN Skeleton
Before placing dots or lines, you need to know how many valence electrons are available. For HCN, hydrogen contributes one valence electron, carbon contributes four, and nitrogen contributes five. That gives a total of ten valence electrons, or five electron pairs, to distribute in the final structure.

The next step is arranging the atoms. Hydrogen can only form one single bond, so it must be terminal. Carbon is the natural central atom because it can form four bonds, while nitrogen is more electronegative and can sit at the other end. This produces a preliminary skeleton of H–C–N, which will later gain multiple bonding between carbon and nitrogen.
Step 1: Total Valence Electrons in HCN

The valence count is simple but must be exact: H = 1, C = 4, and N = 5. Adding these numbers gives 1 + 4 + 5 = 10 electrons. In Lewis notation, those ten electrons will appear as bonding pairs and lone pairs, and none can be created or discarded.
Because electrons are usually handled in pairs, you can think of HCN as having five electron pairs to place. Hydrogen needs only two electrons to complete its shell, while carbon and nitrogen each need eight. Keeping those targets in mind prevents common errors such as giving hydrogen an octet or overlooking nitrogen's lone pair.
Step 2: Selecting the Central Atom and Skeleton

Hydrogen is never the central atom in a Lewis structure when a heavier atom is available, because hydrogen can accommodate only two electrons. Carbon becomes the central atom because it can form four bonds and is less electronegative than nitrogen. Nitrogen is placed at the opposite end as a terminal atom.
Connecting the atoms with single bonds first gives H–C–N. This initial skeleton uses two electron pairs, or four electrons, leaving six electrons still available. At this stage, carbon has only four electrons around it, so additional bonding must be introduced to satisfy the octet rule.
Drawing, Checking, and Interpreting the HCN Lewis Structure

With the skeleton in place, the remaining electrons are used to complete octets. Nitrogen initially receives lone pairs, but carbon remains electron-deficient. To fix that, lone pairs from nitrogen are moved into the carbon-nitrogen bond, creating a triple bond and leaving nitrogen with one lone pair.
The final Lewis dot structure of HCN is commonly written as H–C≡N, with two dots on the nitrogen atom. This arrangement gives hydrogen a duet, carbon an octet, and nitrogen an octet. It also produces formal charges of zero on all three atoms, which is the strongest sign that this is the preferred Lewis structure.









Step 3: Placing the Triple Bond and Lone Pair
After forming the initial H–C–N single-bond skeleton, six electrons remain. If those six electrons were placed only as lone pairs, carbon would still have fewer than eight electrons. The solution is to convert lone pairs on nitrogen into bonding pairs between carbon and nitrogen.
Two lone pairs from nitrogen are moved into the bond region, turning the C–N single bond into a triple bond. The triple bond contains six electrons, while nitrogen keeps one lone pair of two electrons. The completed structure is H–C≡N:, where the two dots after nitrogen represent its lone pair.
Step 4: Checking Octets and Formal Charges
Checking the completed structure is essential. Hydrogen is surrounded by two electrons from the H–C bond, so it satisfies the duet rule. Carbon has two electrons from the H–C bond and six electrons from the C≡N triple bond, giving it eight. Nitrogen has six electrons from the triple bond and two electrons from its lone pair, also giving it eight.
Formal charge confirms the structure is optimal. For hydrogen, 1 valence electron minus 0 nonbonding electrons minus 1 bonding pair gives 0. For carbon, 4 minus 0 minus 4 bonds gives 0. For nitrogen, 5 minus 2 nonbonding electrons minus 3 bonds gives 0. A structure with zero formal charges on every atom is generally preferred over alternatives with charge separation.
Once you can sketch HCN with confidence, the same electron-counting routine becomes easier to apply to related molecules such as carbon dioxide, acetylene, and the cyanide ion. Each structure rewards careful attention to valence electrons, octets, and formal charge, and those habits will serve you well far beyond a single Lewis dot diagram.