Murray was trying to reach the last 16 at a slam for the first time since his hip problems began in 2017 but, after threatening another vintage comeback, he fell to a 6-4 6-4 6-7 (1) 6-3 defeat on Arthur Ashe Stadium.
The Scot is at least edging back up the rankings and should hit his highest mark since May 2018 at around 43 but his ambitions remain much bigger than that and this is another season where he has been unable to make a mark on the biggest stage.
Murray had talked positively about his fitness and movement after dropping just one set in his first two matches to make it through to the third round in New York for the first time since 2016.
This was a real step up, though. Berrettini has had injury and illness problems himself this year but is a proven performer at the slams in particular.
He had made at least the quarter-finals at the last four major tournaments he has played, although he missed the French Open this year following hand surgery and then Wimbledon, where he reached the final last summer, after an ill-timed bout of Covid-19.
Later in the evening, Draper's fine US Open run ended in disappointment when he retired injured during the third set of his third-round clash with Karen Khachanov.
The 20-year-old pulled off the biggest victory of his career in the second round, beating sixth seed Felix Auger-Aliassime, and was well placed against Russian 27th seed Khachanov after recovering from a slow start.
But Draper began to show discomfort early in the third set and, after dropping serve in the 11th game and consulting with the trainer, he called it a day trailing 6-3 4-6 6-5.