The first measurement of jet shapes, defined as the fractional transverse momentum radial distribution, for inclusive jets produced in heavy-ion collisions is presented. Data samples of PbPb and pp collisions, corresponding to integrated luminosities of 150 μb−1 and 5.3 pb−1 respectively, were collected at a nucleon–nucleon centre-of-mass energy of View the MathML sourcesNN=2.76 TeV with the CMS detector at the LHC. The jets are reconstructed with the anti-kTkT algorithm with a distance parameter R=0.3R=0.3, and the jet shapes are measured for charged particles with transverse momentum pT>1 GeV/cpT>1 GeV/c. The jet shapes measured in PbPb collisions in different collision centralities are compared to reference distributions based on the pp data. A centrality-dependent modification of the jet shapes is observed in the more central PbPb collisions, indicating a redistribution of the energy inside the jet cone. This measurement provides information about the parton shower mechanism in the hot and dense medium produced in heavy-ion collisions.