[reactions: see text] Condensation reaction of o-phthalaldehyde with primary amines is a classical method for the synthesis of phthalimidines. Although the intermediacy of the corresponding monoimines has been occasionally proposed, the mechanism of their transformation into phthalimidines remains to be elucidated. We present here theoretical evidence supporting a three-step mechanistic pathway for that transformation involving the [1,5]-H sigmatropic rearrangement of the aldehydic proton leading to an intermediate (aminovinyl)ketene as the key step. Other alternative routes have been calculated to be energetically less favorable. Similar transformations of related imino aldehydes enclosing a 5-aza-2,4-pentadienal skeleton via [1,5]-H shifts are also studied.