A vortex laser pulse is incident on a plasma with a density gradient along one transverse direction and a homogeneous density along the other one. As the laser pulse propagates in the plasma, the transverse energy distribution becomes asymmetric along the direction with the homogeneous density, which is shown from particle-in-cell simulations. We demonstrate theoretically that the asymmetric energy distribution results from the rate of plasma density change along the transverse energy flow of the vortex beam. Meanwhile, the degree of asymmetry is found to be positively related to the topological charge of the vortex beam as well as the density gradient of the plasma. Our finding provides a new approach for measuring the topological charge of a vortex beam, and also implies an available probe of the inhomogeneity of an optical medium.