To shed some light on the John—Nirenberg space, the authors of this article introduce the John—Nirenberg-Q space via congruent cubes, \(JNQ_{p,q}^\alpha \left( {{\mathbb{R}^n}} \right)\), which, when p = ∞ and q = 2, coincides with the space Qα (ℝn) introduced by Essén, Janson, Peng and Xiao in [Indiana Univ Math J, 2000, 49(2): 575-615]. Moreover, the authors show that, for some particular indices, \(JNQ_{p,q}^\alpha \left( {{\mathbb{R}^n}} \right)\) coincides with the congruent John—Nirenberg space, or that the (fractional) Sobolev space is continuously embedded into \(JNQ_{p,q}^\alpha \left( {{\mathbb{R}^n}} \right)\). Furthermore, the authors characterize \(JNQ_{p,q}^\alpha \left( {{\mathbb{R}^n}} \right)\) via mean oscillations, and then use this characterization to study the dyadic counterparts. Also, the authors obtain some properties of composition operators on such spaces. The main novelties of this article are twofold: establishing a general equivalence principle for a kind of ‘almost increasing’ set function that is here introduced, and using the fine geometrical properties of dyadic cubes to properly classify any collection of cubes with pairwise disjoint interiors and equal edge length.