High-resolution x-ray diffraction is a valuable nondestructive tool for structural characterization of semiconductor heterostructures, and the diffraction profiles contain information on the depth profiles of strain, composition, and defect densities in device structures. Much of this information goes untapped because the lack of phase information prevents direct inversion of the diffraction profile. The current practice is to use dynamical simulations in conjunction with a curve-fitting procedure to indirectly extract the profiles of strain and composition. These dynamical simulations have been based on perfect, dislocation-free laminar crystals, rendering the analysis inapplicable to structures having dislocation densities greater than about 106 cm−2. In this work we present a dynamical model for Bragg x-ray diffraction in semiconductor device structures with nonuniform composition, strain, and dislocation density, which is based on the Takagi–Taupin equation for distorted crystals and accounts for the angular and strain broadening of dislocations. We show that the x-ray diffraction profiles from ZnSySe1−y multilayers and superlattices are strongly affected by the depth distribution of the dislocation density as well as the composition, suggesting that it should be possible to extract the profiles of composition, strain, and dislocation density by the analysis of measured diffraction profiles.