We show that the likely reason of interface roughness of Al xGa1-xAs/GaAs heterostructures is the surface segregation of background impurities present in the AlGaAs layer. The roughness increases with x and is worse for x=1. In our system, Al is considered to be the main source of impurities in AlGaAs. When grown using a less pure Al source, Al xGa1-xAs/GaAs interfaces show waviness with wavelength ranging from a few hundred to few thousand Å even for x=0.1. Such wavy AlGaAs/GaAs interfaces were not observed when a purer Al source was used irrespective of the AlGaAs thickness, value of x, growth rate, growth temperature (<630°C), As4:Ga flux ratio, and other growth conditions. The AlAs/GaAs interface smoothness was further improved by using 2°to 4°off (100) towards 〈111〉A GaAs substrates, and by incorporating thin layers of GaAs at regular intervals in AlAs.