We explore the isothermal total matter radial density profiles in early-type galaxies ( ETGs ) selected from the IllustrisTNG simulation . For a sample of 514 ETGs in the stellar mass range of 10 ^ { 10.7 } \mathrm { M } _ { \astrosun } \leqslant M _ { \ast } \leqslant 10 ^ { 11.9 } \mathrm { M } % _ { \astrosun } at z = 0 , the total power-law slope has a mean of \langle \gamma ^ { \prime } \rangle = 2.003 \pm 0.008 and a standard deviation of \sigma _ { \gamma ^ { \prime } } = 0.175 over the radial range from 0.4 to 4 times the stellar half mass radius . Several correlations between \gamma ^ { \prime } and galactic properties including stellar mass , effective radius , stellar surface density , central velocity dispersion , central dark matter fraction and in-situ-formed stellar mass ratio are compared to observations and other simulations , revealing that IllustrisTNG reproduce correlation trends qualitatively , and \gamma ^ { \prime } is almost constant with redshift below z = 2 . The power-law density profile of the ETG dark matter halos is steeper in the full physics ( FP ) run than their counterparts in the dark matter only ( DMO ) run . The dark matter inner slopes of the best-fit generalized NFW profile are much steeper than the standard NFW profile and they are anti-correlated ( constant ) with the halo mass in the FP ( DMO ) run . The dark matter inner slope is also anti-correlated with the halo concentration parameter c _ { 200 } in both runs . Comparison of the mass-weighted slope/central dark matter fraction correlation , \gamma _ { \mathrm { mw } } ^ { \prime } - f _ { \mathrm { DM } } , with models and observations indicates contraction of the IllustrisTNG dark matter halos , especially in lower-mass systems .