KELT-9 b, the hottest known exoplanet, with Teq ~ 4400 K, is the archetype of a new planet class known as ultra-hot Jupiters. These exoplanets are presumed to have an atmosphere dominated by neutral and ionized atomic species. In particular, Hα and Hβ Balmer lines have been detected in the KELT-9 b upper atmosphere, suggesting that hydrogen is filling the planetary Roche lobe and escaping from the planet. In this work, we detected δ Scuti-type stellar pulsation (with a period Ppuls = 7.54 ± 0.12 h) and studied the Rossiter-McLaughlin effect (finding a spin-orbit angle λ = −85.01° ± 0.23°) prior to focussing on the Balmer lines (Hα to Hζ) in the optical transmission spectrum of KELT-9 b. Our HARPS-N data show significant absorption for Hα to Hδ. The precise line shapes of the Hα, Hβ, and Hγ absorptions allow us to put constraints on the thermospheric temperature. Moreover, the mass loss rate, and the excited hydrogen population of KELT-9 b are also constrained, thanks to a retrieval analysis performed with a new atmospheric model. We retrieved a thermospheric temperature of T = 13 200−720+800 K and a mass loss rate of Ṁ = 1012.8±0.3 g s−1 when the atmosphere was assumed to be in hydrodynamical expansion and in local thermodynamic equilibrium (LTE). Since the thermospheres of hot Jupiters are not expected to be in LTE, we explored atmospheric structures with non-Boltzmann equilibrium for the population of the excited hydrogen. We do not find strong statistical evidence in favor of a departure from LTE. However, our non-LTE scenario suggests that a departure from the Boltzmann equilibrium may not be sufficient to explain the retrieved low number densities of the excited hydrogen. In non-LTE, Saha equilibrium departure via photo-ionization, is also likely to be necessary to explain the data.