We show that rotating Rayleigh–Bénard convection, where a rotating fluid is heated from below, exhibits a non-Hermitian topological invariant. Recently, Favier & Knobloch (J. Fluid Mech., vol. 895, 2020, R1) hypothesized that the robust sidewall modes in rapidly rotating convection are topologically protected. By considering a Berry curvature defined in the complex wavenumber space, we reveal that the bulk states can be characterized by a non-zero integer Chern number, implying a potential topological origin of the edge modes based on the Atiyah–Patodi–Singer index theorem (Fukaya et al., Phys. Rev. D, vol. 96 2017, 125004; Yu et al., Nucl. Phys. B, vol. 916, 2017, pp. 550–566). The linearized eigenvalue problem is intrinsically non-Hermitian, therefore, the definition of Berry curvature generalizes that of the stably stratified problem. Moreover, the three-dimensional set-up naturally regularizes the eigenvector, avoiding the compactification problem in shallow water waves (Tauber et al., J. Fluid Mech., vol. 868, 2019, R2). Under the hydrostatic approximation, it recovers a two-dimensional analogue of the one which explains the topological origin of the equatorial Kelvin and Yanai waves (Delplace et al., Science, vol. 358, issue 6366, 2017, pp. 1075–1077). The non-zero Chern number relies only on rotation when the fluid is stratified, no matter whether it is stable or unstable. However, the neutrally stratified system does not support a topological invariant. In addition, we define a winding number to visualize the topological nature of the fluid. Our results represent a step forward for the topologically protected states in convection, but the bulk-boundary correspondence requires a further direct analysis for proof, and the robustness of the edge states under varying boundary conditions remains a question to be answered.