Azole rings, such as thiazole or oxazole occur in natural peptide and protein main chain as isosteric replacements of the amide group, incorporated into peptide chain by post-translational modification. Residues with imidazole seem to be another tool for the peptide-based drug design, due to their specific prototropic tautomeric as well as amphoteric properties. In this study, we proved that both tautomer and pH change can cause a conformational switch of the studied residues. The studies using the DFT method were conducted in an environment of increasing polarity (gas phase, chloroform, and water) for alanine (1–4) and dehydroalanine (5–8) with adjacent imidazole. The conformational maps (Ramachandram diagrams) are presented and the stability of possible conformations is discussed. The neutral forms of studied compounds, tautomers τ and π, adapt the conformations αRτ (φ, ψ = -75°, -114°) and C7eq (φ, ψ = -75°, 66°), respectively, which are stabilised by the internal N-H···O hydrogen bond. Their torsion angles ψ differ by about 180°, which results in a considerable impact on the peptide chain conformation. The cation form (3) adapts both these conformations, whereas the anion analogue (4) prefers the conformations C5 (φ, ψ ~ -165°, -178°) and β2 (φ, ψ ~ -165°, -3°), in which the N-H···N hydrogen bond is created. Dehydroamino acid analogues, the tautomers τ (5) and π (6) and anion form (8), have a strong tendency towards the conformations β2 (φ, ψ ~ -179°, 0°) and C5 (φ, ψ ~ -180°, 180°), stabilized by the N-H···N hydrogen bond and π-electron conjugation due to the presence of Cα sp2. The preferences of the protonated imidazolium form 7 depend on the environment. The imidazole ring, acting as a donor or acceptor of internal hydrogen bonds, has a profound effect on the type of conformation.