The Briton, 23, had two set points on his own serve to force a decider but could not convert, and Robredo won the third-round match 7-6 (8-6) 6-1 4-6 7-5 in three hours and 13 minutes.
Robredo, who struggled with a leg injury in the closing stages, fought back superbly from 5-3 down in the fourth set to claim victory.
Evans, ranked 179th, earned £60,000 in prize money for his efforts and enough points to get close to the world's top 150, but missed out on a possible dream fourth-round match against Roger Federer.
"It was a tough one, especially to go down in the fourth set after serving for it and having two set points," Evans told BBC Radio 5 live.
"I felt in pretty much total control of the match. The last point is always the hardest one and I couldn't get that last point of the set to take it to a fifth.
"I just played two really loose points - that's all it was. They came at the wrong time. I just have to learn on that for next time."
It was the British number three's sixth match in 10 days at Flushing Meadows after coming through three rounds of qualifying, then beating 11th seed Kei Nishikori and world number 52 Bernard Tomic.
He had never won a match in the main draw of a Grand Slam tournament before New York, and playing under lights on the Louis Armstrong Stadium, albeit in front of a sparse crowd, was a far cry from the Challenger events he is more used to.
Evans impressed in the opening set but 31-year-old Robredo's experience told as he edged it in the tie-break, then raced through the second in just 28 minutes.
Defeat was not far away for Evans at 4-4 in the third but he got the vital break with a sharp backhand volley, pumping his fist as he made his way back to the chair, and served out the set to love with an ace.
"I was sure the match was heading to a fifth set but Dan Evans just tightened up. After missing those set points in the fourth, he started rushing a bit, showed his inexperience and made a couple of bad shot choices.
"It is such a shame for him, but once he gets over the disappointment there is no doubt that there are so many positives. It looks like his career is going to go to another level after this tournament."
Things seemed to be turning Evans's way when Robredo spent the next two changeovers having his left thigh massaged, but the Spaniard fought magnificently in the fourth set.
Evans was bristling with positive intent, moving forward at every opportunity, and twice broke to go ahead, but, serving at 5-3, 40-15, the nerves appeared to bite and he gave the set points up with a double fault and an error.
Robredo sensed his chance and pounded away from the baseline, drawing two more errors to recover the game and, after a solid hold, the pressure was quickly back on Evans.
From standing on the verge of a fifth set, Evans was now serving to stay in the match, and a wayward drop shot and a double fault brought Robredo to match point.
He closed in on the net to chase down another drop shot and leapt upon the Briton's response to angle away the volley and bring Evans's amazing US Open campaign to a sudden end.
"It's been a great experience, a great learning curve," added Evans, who heads to Croatia next for Great Britain's Davis Cup tie on 13-15 September.
"I can definitely play with these guys so I should be confident going into the next tournaments."
A battling Dan Evans could not take his surprise US Open run into the second week as he lost to Spanish 19th seed Tommy Robredo in four sets.