In this paper, in the setting of Heisenberg groups H n , n ≥ 2, we introduce two classes of Q-type spaces related with weight functions denoted byK (H n ), i = 1, 2, including the average oscillation property, the John-Nirenberg-type inequality and the relations with classical function spaces. By the family of convolution operators {𝜙 𝜌 } 𝜌>0 , we extend Q (i) K (H n ), i = 1, 2, to the function spaces on the Siegel upper half space U n . The wavelet characterizations of Q (i) K (H n ), i = 1, 2 are also obtained.