Structure determination of amorphous materials remains challenging, owing to the disorder inherent to these materials. Nuclear magnetic resonance (NMR) powder crystallography is a powerful method to determine the structure of molecular solids, but disorder leads to both a high degree of overlap between measured signals, resulting in challenges for spectral assignment, and prevents the unambiguous identification of a single modelled periodic structure as representative of the whole material. Here, we determine the atomic-level ensemble structure of the amorphous form of the drug AZD4625 by combining solid-state NMR experiments with molecular dynamics (MD) simulations and machine-learned chemical shifts. By considering the combined shifts of all 1H and 13C atomic sites in the molecule, we determine the structure of the amorphous form by identifying an ensemble of local molecular environments that are in agreement with experiment. We then extract preferred conformations and intermolecular interactions in the amorphous sample, and analyze the structure in terms of the hydrogen bonding and conformational factors that stabilize the amorphous form of the drug.