U.S. factories posted their best month in two years in July, suggesting a spring slowdown in manufacturing may be giving way to a more robust recovery.

The Institute for Supply Management on Thursday said its broad index, in which any reading above 50 indicates expansion, jumped to 55.4 from 50.9 in June—the biggest one-month jump since 1996. Factories ramped up production to the highest level in nine years as new orders hit a...