The structure-property relation is a key outstanding problem in the study of nanocomposite materials. Here we elucidate the fundamental physics of nanodopants in thermoelectric nanocomposites XPb(m)YTe(2+m) (X = Ag, Na; Y = Sb, Bi). First-principles calculations unveil a sizable band-gap widening driven by nanodopant-induced lattice strain and a band split-off mainly caused by the spin-orbit interaction in nanodopant. Boltzmann transport calculations on PbTe with modified band mimicking nanodopant-induced modulations show significant but competing effects on high-temperature electron transport behavior. These results offer insights for understanding experimental findings and optimizing thermoelectric properties of narrow band-gap semiconductor nanocomposites.