Knowledge of the structure of amorphous solids can direct, for example, the optimization of pharmaceutical formulations, but atomic-level structure determination in amorphous molecular solids has so far not been possible. Solid-state nuclear magnetic resonance (NMR) is among the most popular methods to characterize amorphous materials, and molecular dynamics (MD) simulations can help describe the structure of disordered materials. However, directly relating MD to NMR experiments in molecular solids has been out of reach until now because of the large size of these simulations. Here, using a machine learning model of chemical shifts, we determine the atomic-level structure of the hydrated amorphous drug AZD5718 by combining dynamic nuclear polarization-enhanced solid-state NMR experiments with predicted chemical shifts for MD simulations of large systems. From these amorphous structures we then identify H-bonding motifs and relate them to local intermolecular complex formation energies.