Accurate atomic modeling of macromolecular structures into cryo-electron microscopy (cryo-EM) maps is a major challenge, as the moderate resolution makes accurate placement of atoms difficult. We present Rosetta enumerative sampling (RosettaES), an automated tool that uses a fragment-based sampling strategy for de novo model completion of macromolecular structures from cryo-EM density maps at 3-5-Å resolution. On a benchmark set of nine proteins, RosettaES was able to identify near-native conformations in 85% of segments. RosettaES was also used to determine models for three challenging macromolecular structures.