Let $V$ be a complete discrete valuation ring with residue field $k$ of characteristic $p>0$ and fraction field $K$ of characteristic zero. Let ${\cal S}$ be a formal scheme over $V$ and let $\mathfrak{X}\to {\cal S}$ be a locally projective formal abelian scheme. In this paper we prove that, under suitable natural conditions on the Hasse–Witt matrix of $\mathfrak{X}\otimes_V V/\mathit{pV}$, the kernel of the Frobenius morphism on $\mathfrak{X}_k$ can be canonically lifted to a finite and flat subgroup scheme of $\mathfrak{X}$ over an admissible blow-up of ${\cal S}$, called the ‘canonical subgroup of $\mathfrak{X}$’. This is done by a careful study of torsors under group schemes of order $p$ over $\mathfrak{X}$. We also present a filtration on ${\rm H}^1(\mathfrak{X},\mu_p)$ in the spirit of the Hodge–Tate decomposition.