The hydrogen-bonded interactions in the simple (HNZ)2 dimers, with Z = O and S, were investigated using quantum chemical calculations with the second-order Møller–Plesset perturbation (MP2), coupled-cluster with single, double (CCSD), and triple excitations (CCSD(T)) methods in conjunction with the 6-311++G(2d,2p), aug-cc-pVDZ, and aug-cc-pVTZ basis sets. Six-membered cyclic structures were found to be stable complexes for the dimers (HNO)2, (HNS)2, and (HNO–HNS). The pair (HNS)2 has the largest complexation energy (–11 kJ/mol), and (HNO)2 the smallest one (–9 kJ/mol). A bond length contraction and a frequency blue shift of the N–H bond simultaneously occur upon hydrogen bond formation of the N–H···S type, which has rarely been observed before. The stronger the intramolecular hyperconjugation and the lower the polarization of the X–H bond involved as proton donor in the hydrogen bond, the more predominant is the formation of a blue-shifting hydrogen bond.