In this paper, by applying theoretical method to the governing equations of compressible viscous flow, we derive the theoretical formula of the boundary dilatation flux (BDF) on a flexible wall, which generalizes the most recent work of Mao et al. (Acta Mechanica Sinica 38 (2022) 321583) for a stationary wall. Different boundary sources of dilatation are explicitly identified, revealing not only the boundary generation mechanisms of vortex sound and entropy sound, but also some additional sources due to the surface vorticity, surface angular velocity, surface acceleration and surface curvature. In particular, the generation mechanism of dilatation at boundary due to the coupled divergence terms is highlighted, namely, the product of the surface velocity divergence (∇∂B·U) and the vorticity-induced skin friction divergence (∇∂B·τω). The former is attributed to the surface flexibility while the latter characterizes the footprints of near-wall coherent structures. Therefore, by properly designing the surface velocity distribution, the dilatation generation at the boundary could be controlled for practical purpose in near-wall compressible viscous flows.