Roddick, who announced on Friday he would retire after the tournament, took just one hour and 27 minutes to beat Tomic at Flushing Meadows.
Australian teenager Tomic never really got into his stride and made 27 unforced errors.
The 30-year-old Roddick, a former world number one and 2003 US Open champion, will next play unseeded Italian Fabio Fognini, who beat Guillermo Garcia-Lopez of Spain 6-4 6-4 6-2.
"I'm going to try and stick around a little longer," Roddick told the packed crowd in Arthur Ashe Stadium.
Roddick said he became emotional shortly before the match when he saw a tribute to his career being shown on television in the locker room.
"I had no idea what was going to happen out there, honestly, even before the match," Roddick said. "I've played a lot of matches and that was a different kind of nerves than I've had before.
"That was surprising for me. I felt weird before the match. Twenty minutes before it was kind of getting the best of me. I had to get my stuff together before I walked out there.
"I played well and I don't know why."
Roddick said the entire day was an emotional rollercoaster as he contemplated the possibility it would be the last match of his career.
"I've been pretty good about everything but the moment hit me a little bit," he said. "You start realising the finality of the situation. You think different things.
"I walk out for warm-up, and 'Is this going to be the last warm-up?' It works along those lines. It got to me a little bit."
Roddick said his coach, Larry Stefanki, was responsible for calming his nerves.
"Larry had to come over and kind of tell me to knock it off," Roddick said.
The 19-year-old Tomic admitted he was overawed by a full house inside Arthur Ashe Stadium.
"He played very good," Tomic said. "I couldn't do anything, really. He served well. I didn't have many chances to do anything. I was a bit nervous the first set.
"It's very difficult, the first time, to be in front of 22,000 people. It's very different. I'm used to playing in Australia.
"Here it's a bit different. Different feeling playing on the backcourts than playing on the biggest stage in the world, biggest country in the world."
Tomic conceded he felt uncomfortable when the pro-Roddick crowd cheered his errors and said he was denied the chance to practice on the court before the match.
"I felt like anything I did, I wasn't quite sure how to respond," he said. "The ball jumps on that court. It's different to the outside courts. I would like to have had an opportunity to play on it this week.
"It's difficult to get to hit on that court. The more I looked up, the more I realised how many people were there. Like I say, I feel like I needed to hit 10 minutes on the court.
"It's difficult. The top seeds always get the opportunity to hit on that court."
Defending champion Novak Djokovic marched into the third round with a 6-2 6-1 6-2 victory over world number 112 Rogerio Dutra Silva.
The Serb was a class above the 28-year-old Brazilian as he stormed to victory in one hour, 39 minutes.
Second seed Djokovic dropped just two games in his opening-round win and Dutra Silva managed only three more as the Serb ripped his game apart.
Djokovic made just 14 unforced errors as he cruised through to a meeting with France's Julien Benneteau who beat American wildcard Dennis Novikov 3-6 6-4 7-6(1) 7-5.
David Ferrer also advanced with ease earlier in the day with a 6-2 6-3 7-6 victory over Dutch qualifier Igor Sijsling.
The 30-year-old Spaniard sped through the first two sets and though he was tested hard in the third, he was always in control and clinched a convincing victory in two hours, seven minutes.
Ferrer, who reached the fourth round at Flushing Meadows a year ago, ran Sijsling ragged from the baseline as he raced to a two-sets lead in little over an hour.
World number 78 Sijsling raised his game in the third set and saved five match points but Ferrer won the tie-break 14-12 to set up a match with former champion Lleyton Hewitt of Australia who won an epic five-setter against Gilles Muller of Luxembourg 3-6 7-6(5) 6-7(5) 7-5 6-4.
It was a good day for the other seeds in action, Janko Tipsarevic, seeded eighth, leading the charge with a straight-set 6-4 6-3 6-4 win over American Brian Baker. The Serb moves on to meet Grega Zemlja, the Slovenian a 6-4 2-6 6-4 6-4winner over Cedrik-Marcel Stebe of Germany.
Seventh seed Juan Martin Del Potro ended the hopes of Ryan Harrison 6-2 6-3 2-6 6-2 to set up a meeting with fellow Argentine Leonardo Mayer, who beat Spain's Tommy Robredo 6-1 6-4 4-6 7-5.
Ninth seed John Isner booked a date with Philipp Kohlschreiber after a 6-3 6-7(5) 6-4 6-3 win over Jarkko Nieminen. Kohlschreiber edged a five-setter with Benoit Paire 6-7(4) 6-3 3-6 6-2 7-6(4) to advance.
Stanislas Wawrinka downed Steve Darcis 6-7(6) 6-3 4-6 6-1 7-5 and the Swiss will play Alexandr Dolgopolov for a place in the last eight after the Ukrainian saw off Marcos Baghdatis 6-4 3-6 6-0 7-6(5).
Completing the last-16 line-up are 13th seed Richard Gasquet, a 6-3 6-3 6-1 winner over American Bradley Klahn, and Steve Johnson of the US, who shocked Ernests Gulbis 6-7(3) 7-6(5) 6-3 6-4.