The Australian veteran put in a typically dogged performance but was downed in four sets by the Spaniard at Flushing Meadows.
"All in all I'm happy," Hewitt said. "It takes a quality player to beat me.
"He picked up his game in the third set. He started dictating play. He didn't give me quite as many cheap points."
Hewitt won one of his two Grand Slam titles in New York in 2001.