  In this paper, we build the Hamiltonian system and the corresponding Lax
pairs associated to a twisted connection in $\mathfrak{gl}_2(\mathbb{C})$
admitting an irregular and ramified pole at infinity of arbitrary degree, hence
corresponding to the Painlev\'{e} $1$ hierarchy. We provide explicit formulas
for these Lax pairs and Hamiltonians in terms of the irregular times and
standard $2g$ Darboux coordinates associated to the twisted connection.
Furthermore, we obtain a map that reduces the space of irregular times to only
$g$ non-trivial isomonodromic deformations. In addition, we perform a
symplectic change of Darboux coordinates to obtain a set of symmetric Darboux
coordinates in which Hamiltonians and Lax pairs are polynomial. Finally, we
apply our general theory to the first cases of the hierarchy: the Airy case
$(g=0)$, the Painlev\'{e} $1$ case $(g=1)$ and the next two elements of the
Painlev\'{e} $1$ hierarchy.
